Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit cb675c2

Browse files
committed
Add SonarCloud workflow (coverage)
Signed-off-by: Serhii Horodilov <sgorodil@gmail.com>
1 parent 30e771e commit cb675c2

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Collect coverage report for SonarCloud
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
- devel
11+
12+
jobs:
13+
sonarcloud:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: "3.9"
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install pytest coverage
26+
- name: Collect coverage
27+
run: |
28+
coverage run -m pytest
29+
coverage xml
30+
- name: Upload coverage report
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: coverage
34+
path: ./coverage.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ __pycache__
2424
# coverage reports
2525
*.coverage.db
2626
*.coverage
27+
coverage.*
2728

2829
# local databases
2930
pgdata/

0 commit comments

Comments
 (0)