Skip to content

Commit 81e5851

Browse files
authored
Setup CI with Gitlab actions (#267)
* WIP * Removed travis-ci configuration
1 parent 16e8314 commit 81e5851

File tree

3 files changed

+42
-45
lines changed

3 files changed

+42
-45
lines changed

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Run tests with tox
2+
3+
on: [push, pull_request]
4+
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
deploy:
10+
runs-on: ubuntu-20.04
11+
strategy:
12+
matrix:
13+
include:
14+
python-version:
15+
- '3.6'
16+
- '3.7'
17+
- '3.8'
18+
- '3.9'
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
steps:
22+
- uses: actions/checkout@v3
23+
24+
- uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: 'pip'
28+
cache-dependency-path: '**/requirements*.txt'
29+
30+
- name: Upgrade packaging tools
31+
run: python -m pip install --upgrade pip setuptools virtualenv wheel
32+
33+
- name: Install dependencies
34+
run: python -m pip install --upgrade codecov tox tox-py
35+
36+
- name: Run tox targets for ${{ matrix.python-version }}
37+
run: tox --py current
38+
39+
- name: Upload coverage
40+
run: |
41+
codecov -e TOXENV,DJANGO

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DJANGO =
2323

2424
setenv =
2525
PYTHONPATH = {toxinidir}
26-
commands = pytest {posargs}
26+
commands = pytest --coverage {posargs}
2727
deps =
2828
django-{22,30,31,master}: djangorestframework>=3.12,<3.13
2929
django-22: Django>=2.2,<2.3

0 commit comments

Comments
 (0)