8000 Create code-coverage.yml (#1190) · stijnhenken/server-client-python@a29ba6c · GitHub
[go: up one dir, main page]

Skip to content

Commit a29ba6c

Browse files
authored
Create code-coverage.yml (tableau#1190)
copied from /tableau/tabcmd repo
1 parent 97747b7 commit a29ba6c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/code-coverage.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check Test Coverage
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- development
7+
8+
jobs:
9+
build:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
python-version: ['3.10']
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e .[test]
30+
31+
# https://github.com/marketplace/actions/pytest-coverage-comment
32+
- name: Generate coverage report
33+
run: pytest --junitxml=pytest.xml --cov=tableauserverclient tests/ | tee pytest-coverage.txt
34+
35+
- name: Comment on pull request with coverage
36+
uses: MishaKav/pytest-coverage-comment@main
37+
with:
38+
pytest-coverage-path: ./pytest-coverage.txt

0 commit comments

Comments
 (0)
0