CI #173
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
- name: Upgrade pip and install linters | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 pydocstyle packaging | |
- name: flake8 PEP compliance checks | |
run: python -m flake8 unimpeded tests | |
- name: pydocstyle documentation style checks | |
run: python -m pydocstyle --convention=numpy unimpeded | |
sphinx: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Upgrade pip and install doc requirements | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e ".[all,docs]" | |
- name: build documentation | |
run: | | |
cd docs | |
make clean | |
make html SPHINXOPTS="-W --keep-going -n" | |
pip: | |
env: | |
ZENODO_SANDBOX_TOKEN: ${{ secrets.ZENODO_SANDBOX_TOKEN }} | |
PR_NUMBER: ${{ github.event.number }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -e ".[test]" | |
- name: Test with pytest | |
run: python -m pytest --cov=unimpeded tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
test-build-n-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 | |
- name: Install pypa/build | |
run: python -m pip install build --user | |
- name: Build a binary wheel and a source tarball | |
run: python -m build --sdist --wheel --outdir dist/ | |
- name: Publish to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
continue-on-error: true | |
with: | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
skip_existing: true |