Skip to content

Commit 561c02b

Browse files
GitHub actions (#9)
* Try tox * Correct use of py310
1 parent 62eddf9 commit 561c02b

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[run]
2+
relative_files = True
23
omit =
34
src/rest_framework_tricks/tests/*
45
example/simple/settings/*

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
GITHUB_TOKEN
2+
COVERALLS_REPO_TOKEN

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install Dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install tox tox-gh-actions
24+
- name: Run Tests
25+
run: tox
26+
- name: Coveralls
27+
uses: AndreMiras/coveralls-python-action@develop
28+
with:
29+
parallel: true
30+
flag-name: Run Tests
31+
32+
coveralls_finish:
33+
needs: test
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Coveralls Finished
37+
env:
38+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
39+
GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
40+
uses: AndreMiras/coveralls-python-action@develop
41+
with:
42+
parallel-finished: true
43+
debug: True

tox.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ deps =
2121
djangorestframework312: djangorestframework>=3.12.0,<3.13
2222
commands =
2323
{envpython} -m pytest -vvv
24+
25+
[gh-actions]
26+
python =
27+
'3.6': 'py36'
28+
'3.7': 'py37'
29+
'3.8': 'py38'
30+
'3.9': 'py39'
31+
'3.19': 'py310'

0 commit comments

Comments
 (0)