Skip to content

Commit 659861a

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

File tree

4 files changed

+67
-91
lines changed

4 files changed

+67
-91
lines changed

.github/workflows/tests.yml

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

.travis.yml

-88
This file was deleted.

README.rst

-3
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

+17
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ 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+
master: drfmaster
22+
623
[testenv]
724
deps =
825
django22: Django>=2.2,<2.3

0 commit comments

Comments
 (0)