ci: use codspeed for benchmarking (#42) #156
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: Test | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
django-version: ["4.2", "5.0"] | |
exclude: | |
# django 5 requires python >=3.10 | |
- python-version: 3.9 | |
django-version: 5.0 | |
- python-version: 3.9 | |
django-version: 5.1 | |
name: Test (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- run: make ci | |
- run: pip install Django~=${{ matrix.django-version }} | |
- run: make test | |
test-django-prerelease: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
name: Test Django prerelease (Python ${{ matrix.python-version }}) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- run: make ci | |
- run: pip install --pre django | |
- run: make test | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: 'pip' | |
- run: make ci | |
- run: make typecheck | |