Update pyproject.toml #77
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 Action | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Create matrix | |
id: create_matrix | |
uses: ./ | |
with: | |
matrix: | | |
python-version {3.10}, django-version {4.0, 4.1, 4.2, 5.0, 5.1}, database {sqlite, mysql, postgres} | |
python-version {3.11}, django-version {4.1, 4.2, 5.0, 5.1}, database {sqlite, mysql, postgres} | |
python-version {3.12}, django-version {4.2, 5.0, 5.1}, database {sqlite, mysql, postgres} | |
python-version {3.13}, django-version {5.1}, database {sqlite, mysql, postgres} | |
outputs: | |
matrix: ${{ steps.create_matrix.outputs.matrix }} | |
test: | |
needs: prepare | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
include: ${{fromJson(needs.prepare.outputs.matrix)}} | |
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' | |
- name: Upgrade pip version | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r requirements-test.txt | |
- name: Install django | |
run: | | |
pip install "Django == ${{ matrix.django-version }}.*" | |
- name: Debug matrix | |
run: | | |
echo "Python ${{ matrix.python-version }} + Django ${{ matrix.django-version }} + Database ${{ matrix.database }}" | |
echo "Python: `python --version`" | |
echo "Django: `django-admin --version`" | |
- name: Run tests | |
run: | | |
pytest |