Debian Codegraph @

.github/workflows/test.yml

raw
1 name: Test
2
3 on:
4 push:
5 branches: [master]
6 pull_request:
7 branches: [master]
8
9 permissions:
10 contents: read # to fetch code (actions/checkout)
11
12 jobs:
13 build:
14 runs-on: ubuntu-latest
15 name: Python${{ matrix.python-version }}/Django${{ matrix.django-version }}
16 strategy:
17 matrix:
18 python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19 django-version: ["4.2", "5.0", "5.1", "5.2", "6.0"]
20 exclude:
21 - python-version: "3.10"
22 django-version: "6.0"
23 - python-version: "3.11"
24 django-version: "6.0"
25 - python-version: "3.14"
26 django-version: "4.2"
27 - python-version: "3.14"
28 django-version: "5.0"
29 - python-version: "3.14"
30 django-version: "5.1"
31
32 steps:
33 - uses: actions/checkout@v3
34
35 - name: Set up Python ${{ matrix.python-version }}
36 uses: actions/[email protected]
37 with:
38 python-version: ${{ matrix.python-version }}
39
40 - name: Start Redis
41 uses: supercharge/[email protected]
42
43 - name: Install dependencies
44 run: |
45 python -m pip install --upgrade pip
46 pip install django==${{ matrix.django-version }} \
47 redis django-redis pyyaml rq
48
49 - name: Run Test
50 run: |
51 `which django-admin` test tests --settings=tests.settings --pythonpath=. -v2
52
53 - name: Install optional dependencies
54 run: |
55 pip install prometheus_client
56
57 - name: Run Test with optional dependencies
58 run: |
59 `which django-admin` test tests --settings=tests.settings --pythonpath=. -v2
60
61 mypy:
62 runs-on: ubuntu-latest
63 name: Type check
64
65 steps:
66 - uses: actions/checkout@v3
67
68 - name: Set up Python 3.13
69 uses: actions/[email protected]
70 with:
71 python-version: "3.13"
72
73 - name: Install dependencies
74 run: |
75 python -m pip install --upgrade pip
76 pip install django-stubs[compatible-mypy] rq types-redis
77
78 - name: Run mypy
79 continue-on-error: true
80 id: mypy
81 run: |
82 mypy django_rq
83
84 - name: Set Status
85 if: steps.mypy.outcome == 'failure'
86 run: |
87 echo "Mypy found errors, marking check as neutral"
88 exit 78 # Exit code 78 results in a neutral check