8
8
9
9
jobs :
10
10
11
- black :
11
+ lint :
12
12
runs-on : ubuntu-latest
13
+ strategy :
14
+ matrix :
15
+ lint-command :
16
+ - bandit -r . -x ./tests
17
+ - black --check --diff .
18
+ - flake8 .
19
+ - isort --check-only --diff .
20
+ - pydocstyle .
13
21
steps :
14
22
- uses : actions/checkout@v3
15
23
- uses : actions/setup-python@v4
16
24
with :
17
- python-version : " 3.10"
18
- - run : python -m pip install black
19
- - run : black --check --diff .
25
+ python-version : " 3.x"
26
+ cache : ' pip'
27
+ cache-dependency-path : ' linter-requirements.txt'
28
+ - run : python -m pip install -r linter-requirements.txt
29
+ - run : ${{ matrix.lint-command }}
20
30
21
31
docs :
22
32
runs-on : ubuntu-latest
23
33
steps :
24
- - uses : actions/checkout@v3
25
- - uses : actions/setup-python@v4
26
- with :
27
- python-version : " 3.10"
28
- - run : sudo apt install -y python3-enchant graphviz
29
- - run : python -m pip install --upgrade pip setuptools
30
- - run : pip install sphinxcontrib-spelling
31
- - run : pip install -e '.[docs]'
32
- - run : python setup.py build_sphinx -W -b spelling
34
+ - uses : actions/checkout@v3
35
+ - uses : actions/setup-python@v4
36
+ with :
37
+ python-version : " 3.10"
38
+ - run : sudo apt install -y python3-enchant graphviz
39
+ - run : python -m pip install sphinxcontrib-spelling
40
+ - run : python -m pip install -e '.[docs]'
41
+ - run : python -m sphinx -W -b spelling docs docs/_build
33
42
34
43
dist :
35
44
runs-on : ubuntu-latest
36
45
steps :
37
46
- uses : actions/checkout@v3
38
47
- uses : actions/setup-python@v4
39
48
with :
40
- python-version : " 3.10 "
41
- - run : python -m pip install --upgrade pip setuptools wheel twine readme-renderer
42
- - run : python setup.py sdist bdist_wheel
49
+ python-version : " 3.x "
50
+ - run : python -m pip install --upgrade pip build wheel twine readme-renderer
51
+ - run : python -m build -- sdist --wheel
43
52
- run : python -m twine check dist/*
44
53
45
- pytest :
54
+ PyTest :
46
55
needs :
47
56
- dist
57
+ - lint
48
58
runs-on : ubuntu-latest
49
59
strategy :
50
60
matrix :
@@ -53,38 +63,28 @@ jobs:
53
63
- " 3.9"
54
64
- " 3.10"
55
65
django-version :
56
- - " 2.2a"
57
- - " 3.2a"
58
- - " 4.0a"
59
- steps :
60
- - uses : actions/checkout@v3
61
- - uses : actions/setup-python@v4
62
- with :
63
- python-version : ${{ matrix.python-version }}
64
- - run : sudo apt install -y graphviz redis-server
65
- - run : python -m pip install --upgrade pip setuptools wheel codecov
66
- - run : python -m pip install -e .[dramatiq]
67
- - run : python -m pip install "django~=${{ matrix.django-version }}"
68
- - run : python setup.py test
69
- - run : codecov
70
-
71
- extras :
72
- needs :
73
- - dist
74
- runs-on : ubuntu-latest
75
- strategy :
76
- matrix :
66
+ - " 2.2"
67
+ - " 3.2"
68
+ - " 4.0"
77
69
extras :
78
- - dramatiq
79
- - celery
80
- - dramatiq,reversion
70
+ - " test"
71
+ include :
72
+ - python-version : " 3.x"
73
+ django-version : " 4.0"
74
+ extras : " test,dramatiq"
75
+ - python-version : " 3.x"
76
+ django-version : " 4.0"
77
+ extras : " test,celery"
78
+ - python-version : " 3.x"
79
+ django-version : " 4.0"
80
+ extras : " test,reversion"
81
81
steps :
82
82
- uses : actions/checkout@v3
83
83
- uses : actions/setup-python@v4
84
84
with :
85
- python-version : " 3.10 "
86
- - run : sudo apt-get install -y graphviz redis-server
87
- - run : python -m pip install --upgrade pip setuptools wheel codecov
85
+ python-version : ${{ matrix.python-version }}
86
+ - run : sudo apt install -y graphviz redis-server
87
+ - run : python -m pip install "django==${{ matrix.django-version }}.*"
88
88
- run : python -m pip install -e .[${{ matrix.extras }}]
89
- - run : python setup.py test
90
- - run : codecov
89
+ - run : python -m pytest
90
+ - uses : codecov/codecov-action@v2
0 commit comments