Skip to content

Commit 478b912

Browse files
committed
add github action for pytest and adjust coveragerc
1 parent 25dc3f0 commit 478b912

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.coveragerc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[run]
22
source = transitions
3-
include = */transitions/*
3+
include = */transitions/*
4+
relative_files = True

.github/workflows/pytest.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: pytest
5+
6+
on:
7+
push:
8+
branches: [ master, dev-gha ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: [2.7, 3.7, 3.8, 3.9]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
sudo apt-get install libgraphviz-dev graphviz
28+
python -m pip install --upgrade pip
29+
python -m pip install -r requirements.txt -r requirements_diagrams.txt
30+
python -m pip install -U -r requirements_test.txt
31+
- name: Test with pytest
32+
run: |
33+
coverage run --source=transitions -m pytest --doctest-modules tests/
34+
- name: Coveralls
35+
uses: AndreMiras/coveralls-python-action@develop
36+
with:
37+
parallel: true
38+
flag-name: Test with pytest
39+
40+
coveralls_finish:
41+
needs: test
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Coveralls Finished
45+
uses: AndreMiras/coveralls-python-action@develop
46+
with:
47+
parallel-finished: true

0 commit comments

Comments
 (0)