Point GitHub Actions build to correct Ubuntu image for older Python v… #2
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: Python Tests | ||
| on: | ||
| push: | ||
| branches: [ master, dev ] | ||
| pull_request: | ||
| branches: [ master, dev ] | ||
| jobs: | ||
| test: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # Older Python versions on Ubuntu 20.04 | ||
| - python-version: "3.6" | ||
| os: ubuntu-20.04 | ||
| - python-version: "3.7" | ||
| os: ubuntu-20.04 | ||
| # Newer Python versions on latest Ubuntu | ||
| - python-version: "3.8" | ||
| os: ubuntu-24.04 | ||
| - python-version: "3.9" | ||
| os: ubuntu-24.04 | ||
| - python-version: "3.10" | ||
| os: ubuntu-24.04 | ||
| - python-version: "3.11" | ||
| os: ubuntu-24.04 | ||
| - python-version: "3.12" | ||
| os: ubuntu-24.04 | ||
| - python-version: "pypy-3.9" | ||
| os: ubuntu-24.04 | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install . | ||
| - name: Test with unittest | ||
| run: | | ||
| python -m unittest discover -s tests | ||