Skip to content

Commit e93df22

Browse files
committed
Migrate from Travis CI to GitHub Actions
1 parent 8ee8290 commit e93df22

File tree

2 files changed

+83
-2
lines changed

2 files changed

+83
-2
lines changed

.github/workflows/testing.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: testing
2+
3+
on:
4+
push:
5+
branches: master
6+
pull_request:
7+
8+
jobs:
9+
sanity:
10+
name: sanity / ${{ matrix.toxenv }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.6]
15+
toxenv: [django_not_installed, django_is_installed, flake8, pylint, readme]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Execute tests
25+
run: |
26+
pip install tox
27+
pip install -e .[for_tests]
28+
29+
export TOXENV=${{ matrix.toxenv }}
30+
export PYTHON=${{ matrix.python-version }}
31+
tox
32+
33+
34+
test:
35+
name: test / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }}
36+
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
python-version: [3.6, 3.7, 3.8, 3.9]
40+
django-version: [master, 3.2, 3.1, 3.0, 2.0, 1.11]
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
- name: Set up Python ${{ matrix.python-version }}
45+
uses: actions/setup-python@v1
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
49+
- name: Execute tests
50+
run: |
51+
pip install tox
52+
pip install -e .[for_tests]
53+
54+
export DJANGO=${{ matrix.django-version }}
55+
export PYTHON=${{ matrix.python-version }}
56+
tox
57+
58+
- name: Coveralls
59+
uses: coverallsapp/github-action@master
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
63+
build_and_package_sanity:
64+
runs-on: ubuntu-latest
65+
strategy:
66+
matrix:
67+
python-version: [3.6]
68+
69+
steps:
70+
- uses: actions/checkout@v2
71+
- name: Set up Python ${{ matrix.python-version }}
72+
uses: actions/setup-python@v1
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
76+
- name: Build
77+
run: |
78+
pip install tox
79+
pip install -e .[for_tests]
80+
81+
./scripts/build.sh

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ envlist =
1313

1414
requires =
1515
pip >=21.0.1
16-
tox-travis
16+
tox
1717

1818
[testenv]
1919
commands =
@@ -32,7 +32,7 @@ deps =
3232
flake8: flake8
3333
pylint: pylint
3434
pylint: Django
35-
readme: twine
35+
readme: twine wheel
3636
django111: Django>=1.11,<2.0
3737
django20: Django>=2.0,<2.1
3838
django21: Django>=2.1,<2.2

0 commit comments

Comments
 (0)