Skip to content

Commit 6e6164e

Browse files
committed
Add .github workflows
1 parent 706bf30 commit 6e6164e

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/test-btlib.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test btlib
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Install requirements
18+
run: pip install -r requirements.txt
19+
20+
- name: Test btlib
21+
run: python -m unittest discover tests

.github/workflows/upload-coverage.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
name: CodeCov
3+
4+
on: [pull_request, push]
5+
6+
jobs:
7+
run:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Install requirements
13+
run: pip install -r requirements.txt
14+
15+
- name: Install coverage
16+
run: pip install coverage
17+
18+
- name: Generate Report
19+
run: coverage run -m unittest discover -s tests/
20+
21+
- name: Upload coverage reports to Codecov
22+
uses: codecov/codecov-action@v3
23+
env:
24+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)