88
99jobs :
1010
11- black :
11+ lint :
1212 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 .
1321 steps :
1422 - uses : actions/checkout@v3
1523 - uses : actions/setup-python@v4
1624 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 }}
2030
2131 docs :
2232 runs-on : ubuntu-latest
2333 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
3342
3443 dist :
3544 runs-on : ubuntu-latest
3645 steps :
3746 - uses : actions/checkout@v3
3847 - uses : actions/setup-python@v4
3948 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
4352 - run : python -m twine check dist/*
4453
45- pytest :
54+ PyTest :
4655 needs :
4756 - dist
57+ - lint
4858 runs-on : ubuntu-latest
4959 strategy :
5060 matrix :
@@ -53,38 +63,28 @@ jobs:
5363 - " 3.9"
5464 - " 3.10"
5565 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"
7769 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"
8181 steps :
8282 - uses : actions/checkout@v3
8383 - uses : actions/setup-python@v4
8484 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 }}.*"
8888 - 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