[pre-commit.ci] pre-commit autoupdate #224
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: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
- develop | |
jobs: | |
checks: | |
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.8, 3.9] | |
runs-on: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package | |
run: python -m pip install .[test] | |
- name: Test package | |
run: python -m pytest -ra --cov-report=xml | |
- name: Upload coverage to codecov | |
if: ${{ matrix.python-version == '3.8' && matrix.runs-on == 'ubuntu-latest'}}$ | |
uses: codecov/[email protected] | |
with: | |
#token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
dist: | |
name: Distribution build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Build sdist and wheel | |
run: pipx run build | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: dist | |
- name: Check products | |
run: pipx run twine check dist/* | |
- uses: pypa/[email protected] | |
if: github.event_name == 'release' && github.event.action == 'published' | |
with: | |
user: __token__ | |
# Remember to generate this and set it in "GitHub Secrets" | |
password: ${{ secrets.pypi_password }} |