@@ -2,71 +2,40 @@ name: CI
2
2
on :
3
3
push :
4
4
branches :
5
- - master
5
+ - main
6
6
pull_request :
7
7
8
8
jobs :
9
9
10
- analyze :
11
- name : CodeQL
12
- runs-on : ubuntu-latest
13
- steps :
14
- - name : Checkout repository
15
- uses : actions/checkout@v4
16
- - name : Initialize CodeQL
17
- uses : github/codeql-action/init@v3
18
- with :
19
- languages : python
20
- - name : Perform CodeQL Analysis
21
- uses : github/codeql-action/analyze@v3
22
-
23
- msgcheck :
24
- runs-on : ubuntu-latest
25
- steps :
26
-
27
- - uses : actions/checkout@v4
28
- - run : sudo apt install -y gettext aspell libenchant-2-dev
29
- - uses : actions/cache@v4
30
- with :
31
- path : ~/.cache/pip
32
- key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
33
- restore-keys : |
34
- ${{ runner.os }}-pip-
35
- - run : python -m pip install -r requirements.txt
36
- - run : msgcheck -n vies/locale/*/LC_MESSAGES/*.po
37
-
38
10
lint :
11
+ runs-on : ubuntu-latest
39
12
strategy :
40
- fail-fast : false
41
13
matrix :
42
14
lint-command :
43
- - " bandit -r vies -x tests"
44
- - " black --check --diff ."
45
- - " flake8 ."
46
- - " isort --check-only --diff ."
47
- - " pydocstyle ."
48
- runs-on : ubuntu-latest
15
+ - " ruff format --check --diff ."
16
+ - " ruff check --output-format=github ."
17
+ - " msgcheck -n vies/locale/*/LC_MESSAGES/*.po"
49
18
steps :
50
-
51
19
- uses : actions/checkout@v4
52
- - uses : actions/cache@v4
20
+ - run : sudo apt install -y gettext aspell libenchant-2-dev
21
+ - uses : actions/setup-python@v5
53
22
with :
54
- path : ~/.cache/pip
55
- key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
56
- restore-keys : |
57
- ${{ runner.os }}-pip-
58
- - run : python -m pip install -r requirements.txt
23
+ python-version : " 3.x"
24
+ cache : ' pip'
25
+ cache-dependency-path : ' pyproject.toml'
26
+ - run : python -m pip install -e .[lint]
59
27
- run : ${{ matrix.lint-command }}
60
28
61
- readme :
29
+ dist :
62
30
runs-on : ubuntu-latest
63
31
steps :
64
- - run : sudo apt install -y gettext
65
-
66
32
- uses : actions/checkout@v4
67
- - name : Install Python dependencies
68
- run : python -m pip install --upgrade pip setuptools wheel twine readme-renderer
69
- - run : python setup.py sdist bdist_wheel
33
+ - run : sudo apt install -y gettext
34
+ - uses : actions/setup-python@v5
35
+ with :
36
+ python-version : " 3.x"
37
+ - run : python -m pip install --upgrade pip build twine
38
+ - run : python -m build --sdist --wheel
70
39
- run : python -m twine check dist/*
71
40
- uses : actions/upload-artifact@v4
72
41
with :
75
44
pytest :
76
45
needs :
77
46
- lint
47
+ - dist
78
48
strategy :
79
49
matrix :
80
50
os :
@@ -88,22 +58,17 @@ jobs:
88
58
- " 4.2"
89
59
- " 5.1"
90
60
- " 5.2"
91
- exclude :
92
- # Django 5.x requires Python ≥ 3.10
93
- - python-version : " 3.9"
94
- django-version : " 5.1"
95
- - python-version : " 3.9"
96
- django-version : " 5.2"
97
61
runs-on : ${{ matrix.os }}
98
62
steps :
63
+ - uses : actions/checkout@v4
64
+ - run : sudo apt install -y gettext
99
65
- name : Set up Python ${{ matrix.python-version }}
100
- uses : actions/setup-python@v5.6.0
66
+ uses : actions/setup-python@v5
101
67
with :
102
68
python-version : ${{ matrix.python-version }}
103
- - uses : actions/checkout@v4
104
- - run : python -m pip install --upgrade setuptools wheel codecov pytest pytest-cov pytest-django zeep
105
- - run : python -m pip install django~=${{ matrix.django-version }}
69
+ - run : python -m pip install .[test]
70
+ - run : python -m pip install django~=${{ matrix.django-version }}.0
106
71
- run : python -m pytest
107
- - run : codecov
108
- env :
109
- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
72
+ - uses : codecov/codecov-action@v5
73
+ with :
74
+ flags : py ${{ matrix.python-version }}-dj${{ matrix.django-version }}
0 commit comments