Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update actions #1363

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/biosimulators_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Get tag
id: tag
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
- name: Dispatch new release version to BioSimulators
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Continuous integration
repo: biosimulators/Biosimulators_COBRApy
ref: dev
token: ${{ secrets.BIOSIM_DISPATCH_TOKEN }}
inputs: '{ "simulatorVersion": "${{ steps.tag.outputs.version }}", "simulatorVersionLatest": "true" }'
inputs: '{ "simulatorVersion": "${{ github.ref_name }}", "simulatorVersionLatest": "true" }'
52 changes: 27 additions & 25 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Lint
on:
push:
branches:
- stable
- devel
- stable
- devel
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+a[0-9]+"
pull_request:
branches:
- stable
- devel
- stable
- devel

jobs:
lint:
Expand All @@ -20,25 +20,27 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
python-version: ["3.11"]
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions
- name: isort
run:
tox -e isort
- name: black
run:
tox -e black
- name: flake8
run:
tox -e flake8
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions

- name: isort
run: tox -e isort

- name: black
run: tox -e black

- name: flake8
run: tox -e flake8
123 changes: 61 additions & 62 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: CI-CD
on:
push:
branches:
- stable
- devel
- stable
- devel
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+a[0-9]+"
pull_request:
branches:
- stable
- devel
- stable
- devel

jobs:
test:
Expand All @@ -20,71 +20,70 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ["3.8", "3.11"]
timeout-minutes: 360

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions
- name: Test with tox
run:
tox -- --benchmark-skip
timeout-minutes: 60
- name: Report coverage
shell: bash
run: bash <(curl -s https://codecov.io/bash)
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox -- --benchmark-skip
timeout-minutes: 60
- name: Report coverage
shell: bash
run: bash <(curl -s https://codecov.io/bash)

release:
needs: test
if: startsWith(github.ref, 'refs/tags')
if: github.ref_type == 'tag'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: ["3.11"]
permissions:
contents: write

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get tag
id: tag
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install build twine
- name: Build package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run:
twine upload --skip-existing --non-interactive dist/*
- name: Create GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: "release-notes/${{ steps.tag.outputs.version }}.md"
draft: false
prerelease: false
- name: Publish to website
run: ./scripts/deploy_website.sh
shell: bash
env:
TAG: ${{ steps.tag.outputs.version }}
WORKSPACE: ${{ github.workspace }}
WEBSITE_DEPLOY_TOKEN: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install build twine

- name: Build package
run: python -m build

- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload --skip-existing --non-interactive dist/*

- name: GH release
uses: softprops/action-gh-release@v1
with:
body_path: "release-notes/${{ github.ref_name }}.md"
draft: false
prerelease: false

- name: Publish to website
run: ./scripts/deploy_website.sh
shell: bash
env:
TAG: ${{ github.ref_name }}
WORKSPACE: ${{ github.workspace }}
WEBSITE_DEPLOY_TOKEN: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
36 changes: 19 additions & 17 deletions .github/workflows/safety.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Safety
on:
push:
branches:
- stable
- devel
- stable
- devel
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+a[0-9]+"

jobs:
safety:
Expand All @@ -16,19 +16,21 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ["3.8", "3.9", "3.10", "3.11"]
timeout-minutes: 120

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions
- name: safety
run:
tox -e safety
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install tox tox-gh-actions

- name: safety
run: tox -e safety