CI #338
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: | |
pull_request: | |
# run CI every day to catch issues with external dependency updates | |
# (18th minute to avoid delays during high GH Action loads) | |
schedule: | |
- cron: '18 13 * * *' | |
jobs: | |
test: | |
name: Test Python ${{ matrix.python-version }} | |
timeout-minutes: 3 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
env: | |
PYTHON: ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: install | |
run: make install-dev | |
- name: Lint | |
run: make check | |
- name: test | |
run: make test | |
- name: coverage | |
run: make coverage | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: coverage.xml | |
env_vars: PYTHON | |
env: | |
CODECOV_IGNORE: true | |
deploy: | |
name: Build and Deploy | |
needs: test | |
if: "success() && startsWith(github.ref, 'refs/tags/')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: install | |
run: make install-dev | |
- name: build | |
run: make build | |
- name: upload to pypi | |
run: twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.pypi_token }} |