-
Notifications
You must be signed in to change notification settings - Fork 34
88 lines (80 loc) · 2.18 KB
/
ci.yml
File metadata and controls
88 lines (80 loc) · 2.18 KB
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
name: CI
on: pull_request
jobs:
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- run: python -m pip install isort
- run: isort --check-only --diff --recursive .
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- run: python -m pip install flake8
- run: flake8 .
pydocstyle:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- run: python -m pip install pydocstyle
- run: pydocstyle .
black:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- run: python -m pip install black
- run: black --check --diff .
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- run: sudo apt-get install -y graphviz
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- run: python setup.py develop
- run: python setup.py build_sphinx -W
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer
- uses: actions/checkout@v2
- run: python setup.py sdist bdist_wheel
- run: python -m twine check dist/*
pytest:
needs:
- isort
- pydocstyle
- flake8
- black
strategy:
matrix:
os:
- ubuntu-latest
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
django-version:
- "2.2"
- "3.1"
- "3.2"
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v2
- run: python -m pip install --upgrade setuptools wheel codecov
- run: python -m pip install Django~=${{ matrix.django-version }}
- run: python setup.py test
- run: codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}