Skip to content

Commit 7bb5e36

Browse files
Merge pull request #542 from BORA040126/main
Create coverage.yml
2 parents 0065118 + 51da30a commit 7bb5e36

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/coverage.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Python Coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Check out code
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install -r requirements.txt
23+
24+
- name: Run coverage
25+
run: |
26+
coverage run -m unittest discover
27+
coverage html
28+
29+
- run: smokeshow upload htmlcov
30+
env:
31+
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: CLI Coverage {coverage-percentage}
32+
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 50
33+
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}

0 commit comments

Comments
 (0)