Skip to content

Commit a307488

Browse files
committed
use GitHub Actions
1 parent 20b361a commit a307488

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: GitHub CI
2+
on: ["push", "pull_request"]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-version: [3.6, 3.7]
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Set up Python ${{ matrix.python-version }}
12+
uses: actions/setup-python@v2
13+
with:
14+
python-version: ${{ matrix.python-version }}
15+
- name: Install dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install -r requirements.txt
19+
- name: Run tests
20+
run: pytest --cov=.
21+
- name: Upload coverage data
22+
run: coveralls
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
COVERALLS_FLAG_NAME: python-${{ matrix.python-version }}
26+
COVERALLS_PARALLEL: true
27+
COVERALLS_SERVICE_NAME: github
28+
coveralls:
29+
name: Indicate completion
30+
needs: test
31+
runs-on: ubuntu-latest
32+
container: python:3-slim
33+
steps:
34+
- name: Finished
35+
run: |
36+
pip3 install --upgrade coveralls
37+
coveralls --finish
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
COVERALLS_SERVICE_NAME: github

0 commit comments

Comments
 (0)