Skip to content

Commit a12b215

Browse files
authored
test: add code coverage badge (#97)
1 parent 2e9b17f commit a12b215

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will install Python dependencies, run tests, generate coverage report and upload it to codecov
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: coverage
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
coverage:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python 3.x
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.8'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements-dev.txt
25+
pip install pytest-cov
26+
- name: Install ruptures
27+
run: |
28+
python setup.py install
29+
- name: Test with pytest
30+
run: |
31+
pytest --cov-report=xml --cov=ruptures tests/
32+
33+
- name: Upload to Codecov
34+
run: |
35+
bash <(curl -s https://codecov.io/bash)
36+
37+
- uses: actions/upload-artifact@v2
38+
with:
39+
path: coverage.xml

0 commit comments

Comments
 (0)