10
10
branches :
11
11
- master
12
12
13
+ env :
14
+ PYTEST_ADDOPTS : " --color=yes"
15
+
16
+ # Set permissions at the job level.
17
+ permissions : {}
18
+
13
19
jobs :
14
20
test :
15
21
runs-on : ubuntu-20.04
16
22
continue-on-error : ${{ matrix.allow_failure }}
23
+ timeout-minutes : 15
24
+ permissions :
25
+ contents : read
17
26
steps :
18
27
- uses : actions/checkout@v2
28
+ with :
29
+ persist-credentials : false
19
30
20
31
- uses : actions/setup-python@v2
21
32
with :
@@ -37,15 +48,17 @@ jobs:
37
48
- name : Install dependencies
38
49
run : |
39
50
python -m pip install --upgrade pip
40
- pip install tox==3.20.0
51
+ pip install tox==3.24.4
41
52
42
53
- name : Run tox
43
54
run : tox -e ${{ matrix.name }}
44
55
45
56
- name : Report coverage
46
57
if : contains(matrix.name, 'coverage')
47
- run : |
48
- bash <(curl -s https://codecov.io/bash) -Z -X gcov -X xcode -X gcovout
58
+ uses : codecov/codecov-action@v2
59
+ with :
60
+ fail_ci_if_error : true
61
+ files : ./coverage.xml
49
62
50
63
strategy :
51
64
fail-fast : false
@@ -128,11 +141,15 @@ jobs:
128
141
deploy :
129
142
if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest-django'
130
143
runs-on : ubuntu-20.04
144
+ timeout-minutes : 15
145
+ permissions :
146
+ contents : read
131
147
132
148
steps :
133
149
- uses : actions/checkout@v2
134
150
with :
135
151
fetch-depth : 0
152
+ persist-credentials : false
136
153
137
154
- uses : actions/setup-python@v2
138
155
with :
@@ -141,10 +158,10 @@ jobs:
141
158
- name : Install dependencies
142
159
run : |
143
160
python -m pip install --upgrade pip
144
- pip install --upgrade wheel setuptools tox
161
+ pip install --upgrade build tox
145
162
146
163
- name : Build package
147
- run : python setup.py sdist bdist_wheel
164
+ run : python -m build
148
165
149
166
- name : Publish package
150
167
0 commit comments