Skip to content

Commit 0661d34

Browse files
committed
ci: some tweaks
1 parent 19f277b commit 0661d34

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,23 @@ on:
1010
branches:
1111
- master
1212

13+
env:
14+
PYTEST_ADDOPTS: "--color=yes"
15+
16+
# Set permissions at the job level.
17+
permissions: {}
18+
1319
jobs:
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/[email protected]

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ VENV:=build/venv
44

55
export DJANGO_SETTINGS_MODULE?=pytest_django_test.settings_sqlite_file
66

7-
testenv: $(VENV)/bin/pytest
8-
97
test: $(VENV)/bin/pytest
10-
$(VENV)/bin/pip install -e .
11-
$(VENV)/bin/py.test
8+
$(VENV)/bin/pytest
129

1310
$(VENV)/bin/python $(VENV)/bin/pip:
1411
virtualenv $(VENV)

0 commit comments

Comments
 (0)