1010 branches :
1111 - master
1212
13+ env :
14+ PYTEST_ADDOPTS : " --color=yes"
15+
16+ # Set permissions at the job level.
17+ permissions : {}
18+
1319jobs :
1420 test :
1521 runs-on : ubuntu-20.04
1622 continue-on-error : ${{ matrix.allow_failure }}
23+ timeout-minutes : 15
24+ permissions :
25+ contents : read
1726 steps :
1827 - uses : actions/checkout@v2
28+ with :
29+ persist-credentials : false
1930
2031 - uses : actions/setup-python@v2
2132 with :
@@ -37,15 +48,17 @@ jobs:
3748 - name : Install dependencies
3849 run : |
3950 python -m pip install --upgrade pip
40- pip install tox==3.20.0
51+ pip install tox==3.24.4
4152
4253 - name : Run tox
4354 run : tox -e ${{ matrix.name }}
4455
4556 - name : Report coverage
4657 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
4962
5063 strategy :
5164 fail-fast : false
@@ -128,11 +141,15 @@ jobs:
128141 deploy :
129142 if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest-django'
130143 runs-on : ubuntu-20.04
144+ timeout-minutes : 15
145+ permissions :
146+ contents : read
131147
132148 steps :
133149 - uses : actions/checkout@v2
134150 with :
135151 fetch-depth : 0
152+ persist-credentials : false
136153
137154 - uses : actions/setup-python@v2
138155 with :
@@ -141,10 +158,10 @@ jobs:
141158 - name : Install dependencies
142159 run : |
143160 python -m pip install --upgrade pip
144- pip install --upgrade wheel setuptools tox
161+ pip install --upgrade build tox
145162
146163 - name : Build package
147- run : python setup.py sdist bdist_wheel
164+ run : python -m build
148165
149166 - name : Publish package
150167 uses : pypa/gh-action-pypi-publish@v1.4.1
0 commit comments