Skip to content

Commit 311268f

Browse files
committed
chore: use github-action instead of travis for running tests
1 parent 310e548 commit 311268f

File tree

3 files changed

+36
-10
lines changed

3 files changed

+36
-10
lines changed

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
12+
name: Test on python ${{ matrix.python-version }} and ${{ matrix.os }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os:
18+
- ubuntu-20.04
19+
python-version: [ 2.7, 3.5, 3.6.7, 3.6.10, 3.6.14, 3.7.5, 3.7.11, 3.8.0, 3.8.5, 3.9.0, 3.9.6, 3.9.18, 3.10.13, 3.11.6]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Use Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: 'pip'
28+
29+
- name: Install packages
30+
run: |
31+
python -m pip install --upgrade pip
32+
if [ -f requirements-ci.txt ]; then pip install -r requirements-ci.txt; fi
33+
34+
- name: Run tests
35+
run: coverage run --source=json2html setup.py test

.travis.yml

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

requirements-ci.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coverage==4.5.4

0 commit comments

Comments
 (0)