-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace Travis with github actions (#270) * chore: replace travis with gh actions * test: replace TRAVIS env var with CI * test: run CI only linux for now * chore: add release gh action * docs: add docs gh action * fix: get syntax and deps right * chore: merge docs with release action * fix: install openbabel on CI * refactor: merge release and main actions * fix: use secrets for publishing to pypi * chore: install CPLEX on CI py3.6 * fix: typo * fix: extract cplex properly * chore: schedule CI run every month * Fix plotting (#272) * fix: update escher everywhere * docs: explain how to work in jupyterlab * style: apply flake8 * docs: format missing code block properly * fix: remove docstring typo * Refactor bounds behaviour (#273) * fix: update escher everywhere * docs: explain how to work in jupyterlab * style: apply flake8 * docs: format missing code block properly * refactor: adopt new bounds behavior opencobra/cobrapy#793 * style: improve readability * docs: add badge to binder (#274) * Docs enhance (#276) * fix: update escher everywhere * docs: explain how to work in jupyterlab * style: apply flake8 * docs: format missing code block properly * docs: show favicon * docs: regenerate tutorial notebooks * style: use :py: in API links Co-authored-by: Moritz E. Beber <[email protected]> * style: remove WARNING Co-authored-by: Moritz E. Beber <[email protected]> * fix: reconcile blocked with excluded reactions in OptKnock * chore: unpin optlang * chore: update pickles Co-authored-by: Jorge Carrasco <[email protected]> Co-authored-by: Moritz E. Beber <[email protected]>
- Loading branch information
1 parent
a522da2
commit 7f0e9d3
Showing
27 changed files
with
1,538 additions
and
2,945 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- devel | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
- '[0-9]+.[0-9]+.[0-9]+a[0-9]+' | ||
pull_request: | ||
branches: | ||
- master | ||
- devel | ||
schedule: | ||
# https://crontab.guru/#0_8_1_*_* | ||
- cron: '0 8 1 * *' | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# consider using these | ||
# os: [ubuntu-latest, macos-latest, windows-latest] | ||
os: [ubuntu-latest] | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
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: | | ||
sudo apt install openbabel | ||
python -m pip install --upgrade pip setuptools wheel | ||
python -m pip install tox tox-gh-actions | ||
- name: Install CPLEX (when supported) | ||
env: | ||
CPLEX_SECRET: ${{ secrets.CPLEX_SECRET }} | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
shell: bash | ||
run: ./scripts/install_cplex.sh | ||
- name: Test with tox | ||
run: | ||
tox -- --cov-report=xml | ||
- name: Report coverage | ||
shell: bash | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
||
release: | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.8] | ||
|
||
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 twine | ||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
- name: Check the package | ||
run: twine check dist/* | ||
- 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: | ||
# This token is set by gh actions | ||
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 | ||
|
||
deploy-docs: | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags') | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
# TODO: consider pip cache | ||
run: | | ||
sudo apt-get install pandoc swig | ||
python3 -m pip install ".[docs,jupyter]" | ||
- name: Build docs | ||
run: cd docs && make apidoc && make html && touch _build/html/.nojekyll | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/_build/html | ||
cname: cameo.bio |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.