Test #61
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: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/test.yaml' | |
- 'src/**' | |
- 'test/**' | |
- 'pyproject.toml' | |
- 'tox.ini' | |
pull_request: | |
paths: | |
- '.github/workflows/test.yaml' | |
- 'src/**' | |
- 'test/**' | |
- 'pyproject.toml' | |
- 'tox.ini' | |
schedule: | |
- cron: '33 16 * * 3' # https://crontab.guru/#33_16_*_*_3 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
COLUMNS: "120" | |
FORCE_COLOR: "1" | |
PYTHONUNBUFFERED: "1" | |
jobs: | |
test: | |
name: Test django${{ matrix.django }}-py${{ matrix.py }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { py: "3.12", django: "50" } | |
- { py: "3.12", django: "42" } | |
- { py: "3.11", django: "50" } | |
- { py: "3.11", django: "42" } | |
- { py: "3.11", django: "41" } | |
- { py: "3.10", django: "50" } | |
- { py: "3.10", django: "42" } | |
- { py: "3.10", django: "41" } | |
- { py: "3.10", django: "40" } | |
- { py: "3.10", django: "32" } | |
- { py: "3.9", django: "42" } | |
- { py: "3.9", django: "41" } | |
- { py: "3.9", django: "40" } | |
- { py: "3.9", django: "32" } | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.12" | |
- run: python -m pip install tox | |
- name: Setup python for test ${{ matrix.py }} - django${{ matrix.django }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.py }} | |
- name: Setup test suite | |
run: tox -e django${{ matrix.django }}-py${{ matrix.py }} -vv --notest | |
- name: Run test suite | |
run: tox -e django${{ matrix.django }}-py${{ matrix.py }} --skip-pkg-install | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: true | |
name: codecov-py${{ matrix.py }} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
main: | |
runs-on: ubuntu-latest | |
name: Test django_main | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.12" | |
- run: python -m pip install tox | |
- name: Setup python for test 3.12 - django main branch | |
uses: actions/[email protected] | |
with: | |
python-version: "3.12" | |
- name: Setup test suite | |
run: tox -e django_main -vv --notest | |
- name: Run test suite | |
run: tox -e django_main --skip-pkg-install | |
static-typing: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
python-version: '3.9' | |
- run: pip install tox | |
- name: Run mypy | |
run: tox -e mypy | |
check-migrations: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
python-version: '3.9' | |
- run: pip install tox | |
- name: Check migrations | |
run: tox -e check-migrations |