fix: type alias definitions #151
Workflow file for this run
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] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
- { os: macos-latest, python: "3.7" } # not available for newer arm64 macos | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- uses: actions/cache@v4 | |
with: | |
path: .tox | |
key: ${{ matrix.os }}-${{ matrix.python }}-tox-${{ hashFiles('pyproject.toml', 'setup.py') }} | |
- name: Install libsndfile | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt install -y libsndfile1 | |
- name: Install Tox | |
run: pip install tox | |
- name: Run ruff | |
run: tox -e ruff | |
- name: Run mypy | |
run: tox -e mypy | |
- name: Run pytest | |
run: tox -e py | |
- name: Run pytest with numba | |
run: tox -e py-numba | |
- name: Run PyInstaller test | |
run: tox -e pyinstaller | |
- name: Coverage report | |
run: tox -e coverage-report | |
- name: Upload coverage results to Coveralls | |
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.12' | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: coverage.xml | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install libsndfile | |
run: sudo apt install -y libsndfile1 | |
- name: Install Tox | |
run: pip install tox | |
- name: Check docs | |
run: tox -e docs | |
publish: | |
needs: [test, docs] # only run if previous jobs are successful | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install pypa/build | |
run: python -m pip install build --user | |
- name: Build source distribution and wheel | |
run: python -m build --outdir dist/ . | |
- name: Publish package to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
- name: Publish package to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 |