|
6 | 6 | types: [opened, synchronize, reopened, updated] |
7 | 7 |
|
8 | 8 | jobs: |
| 9 | + pre-commit: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - name: Checkout code |
| 14 | + uses: actions/checkout@v6 |
| 15 | + - name: Set up Python |
| 16 | + uses: actions/setup-python@v6 |
| 17 | + with: |
| 18 | + python-version: 3.12 |
| 19 | + - name: Install Poetry |
| 20 | + run: | |
| 21 | + curl -sSL https://install.python-poetry.org | python3 - |
| 22 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 23 | + - name: Cache Poetry dependencies |
| 24 | + uses: actions/cache@v4 |
| 25 | + with: |
| 26 | + path: | |
| 27 | + ~/.cache/pypoetry |
| 28 | + .venv |
| 29 | + key: poetry-${{ runner.os }}-py3.12-${{ hashFiles('pyproject.toml', 'poetry.lock') }} |
| 30 | + restore-keys: | |
| 31 | + poetry-${{ runner.os }}-py3.12- |
| 32 | + - name: Install dependencies |
| 33 | + run: make dev-install |
| 34 | + - name: Run pre-commit |
| 35 | + run: make pre-commit |
| 36 | + |
9 | 37 | test: |
| 38 | + name: Test (Python ${{ matrix.python-version }}, Django ${{ matrix.django-versions }}) |
10 | 39 | runs-on: ubuntu-latest |
11 | 40 | strategy: |
12 | 41 | matrix: |
13 | 42 | python-version: [3.11, 3.12, 3.13, 3.14] |
| 43 | + django-versions: [5.0, 6.0] |
| 44 | + exclude: |
| 45 | + - python-version: '3.11' |
| 46 | + django-versions: 6.0 |
14 | 47 | steps: |
15 | 48 | - name: Checkout code |
16 | 49 | uses: actions/checkout@v6 |
|
22 | 55 | run: | |
23 | 56 | curl -sSL https://install.python-poetry.org | python3 - |
24 | 57 | echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 58 | + - name: Cache Poetry dependencies |
| 59 | + uses: actions/cache@v4 |
| 60 | + with: |
| 61 | + path: | |
| 62 | + ~/.cache/pypoetry |
| 63 | + .venv |
| 64 | + key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }} |
| 65 | + restore-keys: | |
| 66 | + poetry-${{ runner.os }}-py${{ matrix.python-version }}- |
25 | 67 | - name: Install dependencies |
26 | 68 | run: make dev-install |
27 | | - - name: Run pre-commit |
28 | | - run: make pre-commit |
| 69 | + - name: Set Django version |
| 70 | + run: pip install "Django==${{ matrix.django-versions }}" |
29 | 71 | - name: Run tests |
30 | 72 | run: make test |
0 commit comments