Must be passed by environment variable #568
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: Run tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
# Allow triggering manually on other branches. | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ | |
'3.9', '3.10', '3.11', '3.12', '3.13', | |
'pypy3.10', | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: 'test-requirements.txt' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install -r test-requirements.txt | |
- name: Build package | |
run: | | |
python -m pip -v install . | |
- name: Test with pytest | |
# Enable Python's debug mode to do additional checks, and error if any uncaught warnings are | |
# produced. | |
# Disable assertion rewriting on PyPy, it sometimes breaks there. | |
run: | | |
python -X dev -Werror -m pytest --assert=${{ contains(matrix.python-version, 'pypy') && 'plain' || 'rewrite' }} tests | |
# Don't fail for beta versions of Python. | |
continue-on-error: ${{ contains(matrix.python-version, 'dev') }} |