Test Python π Versions + 3rd-party Deps #1606
This file contains hidden or 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: Test Python π Versions + 3rd-party Deps | |
| on: | |
| push: | |
| branches: ["master"] | |
| pull_request: | |
| branches: ["master"] | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Python ${{ matrix.py }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| py: | |
| - "3.11" | |
| - "3.10" | |
| - "3.9" | |
| os: | |
| - ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup python for test ${{ matrix.py }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.py }} | |
| cache: 'pip' | |
| cache-dependency-path: 'setup.py' | |
| - name: Cache apt packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| /var/cache/apt/archives | |
| /var/lib/apt/lists | |
| key: apt-${{ runner.os }}-portaudio | |
| restore-keys: | | |
| apt-${{ runner.os }}- | |
| - name: Cache tox environments | |
| uses: actions/cache@v3 | |
| with: | |
| path: .tox | |
| key: tox-${{ matrix.os }}-${{ matrix.py }}-${{ hashFiles('tox.ini', 'setup.py') }} | |
| restore-keys: | | |
| tox-${{ matrix.os }}-${{ matrix.py }}- | |
| - name: Install tox | |
| run: python -m pip install tox | |
| - name: Setup test suite | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y portaudio19-dev | |
| python_version="${{ matrix.py }}" | |
| python_version="${python_version/./}" | |
| tox -f "py$python_version" -vvvv --notest | |
| - name: Run test suite | |
| run: | | |
| python_version="${{ matrix.py }}" | |
| python_version="${python_version/./}" | |
| tox -f "py$python_version" -vvvv --skip-pkg-install | |
| env: | |
| PYTEST_ADDOPTS: "-vv --durations=20" | |
| CI_RUN: "yes" |