Skip to content

Commit 761ede5

Browse files
committed
Merge pull request #54: Replace Travis CI with GitHub Actions
2 parents 8eb0f01 + 2cbca92 commit 761ede5

File tree

3 files changed

+58
-25
lines changed

3 files changed

+58
-25
lines changed

.github/workflows/test.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10-dev", "pypy3"]
15+
os: [ubuntu-latest]
16+
include:
17+
- { python-version: "3.7", os: macos-latest }
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Get pip cache dir
28+
id: pip-cache
29+
run: |
30+
echo "::set-output name=dir::$(pip cache dir)"
31+
32+
- name: Cache
33+
uses: actions/cache@v2
34+
with:
35+
path: ${{ steps.pip-cache.outputs.dir }}
36+
key:
37+
${{ matrix.os }}-${{ matrix.python-version }}-v1-${{
38+
hashFiles('**/setup.py') }}
39+
restore-keys: |
40+
${{ matrix.os }}-${{ matrix.python-version }}-v1-
41+
42+
- name: Install dependencies
43+
run: |
44+
python -m pip install -U pip
45+
python -m pip install -U setuptools virtualenv
46+
python -m pip install -U --requirement=requirements-travis.txt
47+
python -m pip install .
48+
49+
- name: Tests
50+
run: |
51+
make check
52+
make test
53+
54+
- name: Upload coverage
55+
uses: codecov/codecov-action@v1
56+
with:
57+
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.pyc
33
.coverage
44
.coverage.*
5+
.tox
56
__pycache__/
67
dist/*.tar.gz
78
dist/*.zip

.travis.yml

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

0 commit comments

Comments
 (0)