Skip to content

Commit 701b1ec

Browse files
committed
[Feat] move tests from travis CI to github actions
1 parent 8477862 commit 701b1ec

File tree

4 files changed

+35
-78
lines changed

4 files changed

+35
-78
lines changed

.github/workflows/pre-commit.yml renamed to .github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pre-commit
1+
name: lint
22

33
on:
44
pull_request:

.github/workflows/tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GitHub actions workflow for testing tmtoolkit
2+
# Runs tests on Ubuntu, MacOS and Windows with Python versions 3.8, 3.9 and 3.10 each, which means 9 jobs are spawned.
3+
# Tests are run using tox (https://tox.wiki/).
4+
#
5+
# author: Markus Konrad <[email protected]>
6+
7+
name: run tests
8+
9+
on:
10+
pull_request:
11+
push:
12+
branches: [master]
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.8", "3.9", "3.10"]
20+
django-version: ["32", "40"]
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: set up python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: 'pip'
28+
- name: install python dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install tox
32+
- name: run tox
33+
run: tox -e py-${{ matrix.python-version }}-django-${{ matrix.django-version }}

.travis.yml

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

tox.ini

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
[tox]
22
envlist =
3-
{py38,py39,py310}-django-40
4-
{py38,py39,py310}-django-32
5-
{py37,py38,py39}-django-31
6-
{py37,py38,py39}-django-22
7-
{py35,py36,py37}-django-20
8-
{py27,py35,py36}-django-111
3+
py{38,39,310}-django{32,40}
94
[testenv]
105
setenv =
116
PYTHONPATH = {toxinidir}:{toxinidir}/django_db_comments
127
commands = coverage run --source django_db_comments runtests.py
138
deps =
14-
django-111: Django>=1.11,<1.12
15-
django-20: Django>=2.0,<2.1
16-
django-22: Django>=2.2,<3.0
17-
django-31: Django>=3.1,<3.2
189
django-32: Django>=3.2,<4.0
1910
django-40: Django>=4.0,<4.1
2011
-r{toxinidir}/requirements_test.txt
21-
basepython =
22-
py310: python3.10
23-
py39: python3.9
24-
py38: python3.8
25-
py37: python3.7
26-
py36: python3.6
27-
py35: python3.5
28-
py27: python2.7

0 commit comments

Comments
 (0)