Skip to content

Commit f71dc72

Browse files
committed
Use GitHub actions for CI instead of Travis
1 parent 848d850 commit f71dc72

File tree

4 files changed

+63
-91
lines changed

4 files changed

+63
-91
lines changed

.github/workflows/tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
python-version: ["3.6", "3.7", "3.8", "3.9"]
11+
django: ["2.2", "3.0", "3.1"]
12+
django-rest-framework: ["3.12"]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install tox tox-gh-actions
23+
- name: Test with tox
24+
run: tox
25+
env:
26+
DJANGO: ${{ matrix.django }}
27+
DJANGO_REST_FRAMEWORK: ${{ matrix.django-rest-framework }}
28+
additional:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
tox-env: ["black", "lint", "docs"]
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Set up Python 3.6
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: 3.6
40+
- name: Install dependencies
41+
run: |
42+
python -m pip install --upgrade pip
43+
pip install tox
44+
- name: Run lint
45+
run: tox
46+
env:
47+
TOXENV: ${{ matrix.tox-env }}

.travis.yml

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

README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
JSON API and Django Rest Framework
33
==================================
44

5-
.. image:: https://travis-ci.com/django-json-api/django-rest-framework-json-api.svg?branch=master
6-
:target: https://travis-ci.com/django-json-api/django-rest-framework-json-api
7-
85
.. image:: https://readthedocs.org/projects/django-rest-framework-json-api/badge/?version=latest
96
:alt: Read the docs
107
:target: https://django-rest-framework-json-api.readthedocs.org/

tox.ini

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ envlist =
33
py{36,37,38,39}-django{22,30,31}-drf{312,master},
44
lint,docs
55

6+
[gh-actions]
7+
python =
8+
3.6: py36
9+
3.7: py37
10+
3.8: py38
11+
3.9: py39
12+
13+
[gh-actions:env]
14+
DJANGO =
15+
2.2: django22
16+
3.0: django30
17+
3.1: django31
18+
19+
DJANGO_REST_FRAMEWORK =
20+
3.12: drf312
21+
622
[testenv]
723
deps =
824
django22: Django>=2.2,<2.3

0 commit comments

Comments
 (0)