-
-
Notifications
You must be signed in to change notification settings - Fork 3k
108 lines (97 loc) · 3.11 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
testenv:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
project: ['regular', 'headless_only', 'login_required_mw']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
django-version: ['main', '4.2', '5.0', '5.1']
exclude:
- python-version: '3.8'
django-version: '5.0'
- python-version: '3.9'
django-version: '5.0'
- python-version: '3.8'
django-version: '5.1'
- python-version: '3.9'
django-version: '5.1'
- python-version: '3.8'
django-version: 'main'
- python-version: '3.9'
django-version: 'main'
# Only test LoginRequiredMiddleware on latest Python/Django.
- project: 'login_required_mw'
python-version: '3.8'
- project: 'login_required_mw'
python-version: '3.9'
- project: 'login_required_mw'
python-version: '3.10'
- project: 'login_required_mw'
python-version: '3.11'
- project: 'login_required_mw'
django-version: 'main'
- project: 'login_required_mw'
django-version: '4.2'
- project: 'login_required_mw'
django-version: '5.0'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Updating package list
run: sudo apt-get update
- name: Install xmlsec
run: sudo apt-get install -y xmlsec1 libxmlsec1-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions coveralls
- name: Tox Test
run: tox
env:
PYTHON_VER: ${{ matrix.python-version }}
DJANGO: ${{ matrix.django-version }}
PRJ: ${{ matrix.project }}
- name: Coverage (Coveralls)
if: ${{ success() && matrix.django-version == '5.1' && matrix.python-version == '3.12' && matrix.project == 'regular' }}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
extra:
runs-on: ubuntu-22.04
strategy:
matrix:
extra-env: ['docs', 'black', 'isort', 'flake8', 'mypy', 'standardjs', 'djlint', 'compilemessages']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
if: ${{ matrix.extra-env == 'standardjs' }}
with:
node-version: '8'
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Updating package list
run: sudo apt-get update
- name: Install xmlsec
run: sudo apt-get install -y xmlsec1 libxmlsec1-dev
- name: Install gettext
run: sudo apt-get install -y gettext
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Tox Test
run: tox
env:
TOXENV: ${{ matrix.extra-env }}