Skip to content

Commit 1345b26

Browse files
atodorovcarlio
authored andcommitted
Migrate from Travis CI to GitHub Actions
1 parent b0af386 commit 1345b26

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

.github/workflows/testing.yml

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

tox.ini

Lines changed: 2 additions & 1 deletion
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 =
@@ -33,6 +33,7 @@ deps =
3333
pylint: pylint
3434
pylint: Django
3535
readme: twine
36+
readme: wheel
3637
django111: Django>=1.11,<2.0
3738
django20: Django>=2.0,<2.1
3839
django21: Django>=2.1,<2.2

0 commit comments

Comments
 (0)