@@ -13,33 +13,32 @@ jobs:
13
13
fail-fast : false
14
14
matrix :
15
15
lint-command :
16
- - " bandit -r mailauth -x tests"
17
- - " black --check --diff ."
18
- - " flake8 ."
19
- - " isort --check-only --diff ."
20
- - " pydocstyle ."
16
+ - bandit -r . -x ./ tests
17
+ - black --check --diff .
18
+ - flake8 .
19
+ - isort --check-only --diff .
20
+ - pydocstyle .
21
21
runs-on : ubuntu-latest
22
22
steps :
23
23
- uses : actions/checkout@v3
24
24
- uses : actions/setup-python@v4
25
25
with :
26
26
python-version : " 3.x"
27
- cache : ' pip'
28
- cache-dependency-path : ' requirements.txt'
29
- - run : python -m pip install -r requirements.txt
27
+ cache : pip
28
+ cache-dependency-path : linter- requirements.txt
29
+ - run : python -m pip install -r linter- requirements.txt
30
30
- run : ${{ matrix.lint-command }}
31
31
32
32
dist :
33
33
runs-on : ubuntu-latest
34
34
steps :
35
- - run : sudo apt install -y gettext
35
+ - uses : actions/checkout@v3
36
36
- uses : actions/setup-python@v4
37
37
with :
38
38
python-version : " 3.x"
39
- - uses : actions/checkout@v3
40
39
- name : Install Python dependencies
41
- run : python -m pip install --upgrade pip setuptools wheel twine readme-renderer
42
- - run : python setup.py sdist bdist_wheel
40
+ run : python -m pip install --upgrade pip build wheel twine readme-renderer
41
+ - run : python -m build -- sdist --wheel
43
42
- run : python -m twine check dist/*
44
43
- uses : actions/upload-artifact@v3
45
44
with :
@@ -51,16 +50,14 @@ jobs:
51
50
- uses : actions/checkout@v3
52
51
- uses : actions/setup-python@v4
53
52
with :
54
- python-version : " 3.x"
55
- cache : ' pip'
56
- cache-dependency-path : ' requirements.txt'
57
- - run : python -m pip install --upgrade pip setuptools wheel
58
- - run : python -m pip install -r requirements.txt
59
- - run : python setup.py develop
60
- - run : python setup.py build_sphinx -W
53
+ python-version : " 3.11"
54
+ - run : sudo apt install -y python3-enchant
55
+ - run : python -m pip install sphinxcontrib-spelling
56
+ - run : python -m pip install -e '.[docs]'
57
+ - run : python -m sphinx -W -b spelling docs docs/_build
61
58
62
59
SQLite :
63
- needs : [lint, dist, docs]
60
+ needs : [lint, dist, docs]
64
61
runs-on : ubuntu-latest
65
62
strategy :
66
63
matrix :
@@ -69,50 +66,48 @@ jobs:
69
66
- " 3.10"
70
67
- " 3.11"
71
68
steps :
72
- - name : Set up Python ${{ matrix.python-version }}
73
- uses : actions/setup-python@v4
69
+ - uses : actions/checkout@v3
70
+ - uses : actions/setup-python@v4
74
71
with :
75
72
python-version : ${{ matrix.python-version }}
76
- - run : python -m pip install --upgrade pip setuptools wheel
77
- - uses : actions/checkout@v3
78
- - run : python setup.py test
79
- - name : Codecov
80
- run : |
81
- python -m pip install codecov
82
- codecov
73
+ - run : python -m pip install -e '.[test]'
74
+ - run : python -m pytest
75
+ - uses : codecov/codecov-action@v2
76
+ with :
77
+ flags : ${{ matrix.python-version }}
83
78
84
- extras :
85
- needs : [lint, dist, docs]
79
+ contrib :
80
+ needs : [lint, dist, docs]
86
81
runs-on : ubuntu-latest
87
82
strategy :
88
83
matrix :
89
84
extras :
90
85
- wagtail
91
- python-version : ["3.x"]
86
+ python-version : ["3.x"]
92
87
steps :
88
+ - uses : actions/checkout@v3
93
89
- name : Set up Python ${{ matrix.python-version }}
94
90
uses : actions/setup-python@v4
95
91
with :
96
92
python-version : ${{ matrix.python-version }}
97
- - run : python -m pip install --upgrade pip setuptools wheel
98
- - uses : actions/checkout@v3
99
- - run : python -m pip install -e ".[${{ matrix.extras }}]"
100
- - run : python setup.py test
101
- - name : Codecov
102
- run : |
103
- python -m pip install codecov
104
- codecov
93
+ - run : python -m pip install -e ".[test,${{ matrix.extras }}]"
94
+ - run : python -m pytest
95
+ - uses : codecov/codecov-action@v2
96
+ with :
97
+ flags : ${{ matrix.extras }}
105
98
106
99
107
100
PostgreSQL :
108
- needs : [lint, dist, docs]
101
+ needs : [lint, dist, docs]
109
102
runs-on : ubuntu-latest
110
103
strategy :
111
104
matrix :
112
- python-version : ["3.10"]
105
+ python-version : ["3.10"]
113
106
django-version :
114
107
- " 4.0"
115
108
- " 4.1"
109
+ extras :
110
+ - postgres
116
111
services :
117
112
postgres :
118
113
image : postgres
@@ -127,21 +122,19 @@ jobs:
127
122
uses : actions/setup-python@v4
128
123
with :
129
124
python-version : ${{ matrix.python-version }}
130
- - run : python -m pip install --upgrade pip setuptools wheel
131
125
- uses : actions/checkout@v3
132
- - run : python -m pip install "psycopg2-binary<2.9" Django~=${{ matrix.django-version }}.0
133
- - run : python setup.py test
126
+ - run : python -m pip install Django~=${{ matrix.django-version }}.0 -e ".[test,${{ matrix.extras }}]"
127
+ - run : python -m pytest
134
128
env :
135
129
DB_PORT : ${{ job.services.postgres.ports[5432] }}
136
130
DB : pg
137
- - name : Codecov
138
- run : |
139
- python -m pip install codecov
140
- codecov
131
+ - uses : codecov/codecov-action@v2
132
+ with :
133
+ flags : ${{ matrix.extras }}
141
134
142
135
analyze :
143
136
name : CodeQL
144
- needs : [SQLite, extras , PostgreSQL]
137
+ needs : [SQLite, contrib , PostgreSQL]
145
138
runs-on : ubuntu-latest
146
139
permissions :
147
140
actions : read
0 commit comments