Merge pull request #339 from paquiteau/rm-args #10
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
name: CD | |
on: | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
coverage: | |
name: Deploy Coverage Results | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Conda with Python 3.8 | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: 3.8 | |
auto-activate-base: false | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r develop.txt | |
python -m pip install twine | |
python -m pip install . | |
- name: Run Tests | |
shell: bash -l {0} | |
run: | | |
python setup.py test | |
- name: Check distribution | |
shell: bash -l {0} | |
run: | | |
python setup.py sdist | |
twine check dist/* | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml | |
flags: unittests | |
api: | |
name: Deploy API Documentation | |
needs: coverage | |
runs-on: ubuntu-latest | |
if: success() | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Conda with Python 3.8 | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge pandoc | |
python -m pip install --upgrade pip | |
python -m pip install -r docs/requirements.txt | |
python -m pip install . | |
- name: Build API documentation | |
shell: bash -l {0} | |
run: | | |
sphinx-apidoc -t docs/_templates -feTMo docs/source modopt | |
sphinx-build -E docs/source docs/_build | |
- name: Deploy API documentation | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build |