Skip to content

Commit 3a81ccc

Browse files
Merge pull request #419 from OP-TED/feature/TED-626
check coverage report
2 parents 576d8a5 + df434f0 commit 3a81ccc

6 files changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/unit-tests-srv.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# - name: Start staging infra
3737
# run: make start-project-services
3838

39-
- name: Run unit tests
39+
- name: Run tests
4040
run: make test-all
4141
- name: Upload coverage to Codecov
4242
uses: codecov/codecov-action@v2.1.0
@@ -46,6 +46,11 @@ jobs:
4646
env_vars: OS,PYTHON
4747
name: codecov-umbrella
4848
fail_ci_if_error: true
49+
- name: SonarCloud Scan
50+
uses: SonarSource/sonarcloud-github-action@master
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
53+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4954
# - name: Clean Mongo DB
5055
# run: make clean-mongo-db
5156
# - name: Upload coverage to Codecov

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ jobs:
3131
envkey_VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
3232
- name: Run unit tests
3333
run: make test
34-
- name: SonarCloud Scan
35-
uses: SonarSource/sonarcloud-github-action@master
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
38-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3934
# - name: Upload coverage to Codecov
4035
# uses: codecov/codecov-action@v1
4136
# with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,4 @@ package.json
117117
.limes/*
118118
*.ser
119119
.DS_Store
120+
.scannerwork/*

requirements.dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ tox-pytest-summary~=0.1.2
99
mongomock==4.0.0
1010
uvicorn[standard]
1111
allure-pytest-bdd==2.10.0
12-

sonar-project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ sonar.sources=ted_sws, dags, notebooks, infra
1212
sonar.language=py
1313
sonar.python.version=3.7, 3.8, 3.9, 3.10
1414
sonar.python.coverage.reportPaths=coverage.xml
15+
sonar.working.directory=/github/.scannerwork
1516

1617
# Encoding of the source files
1718
sonar.sourceEncoding=UTF-8

tox.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ commands =
4040
--cov-report html \
4141
--cov
4242

43+
[coverage:run]
44+
relative_files = True
45+
source = ted_sws/
46+
branch = False
47+
48+
4349
[pytest]
4450
log_cli = true
4551
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)
@@ -51,6 +57,7 @@ addopts =
5157
--cov-report=html
5258
--cov-report=term
5359
--cov-report=xml
60+
--cov-config=tox.ini
5461
--junitxml=junit_report.xml
5562
-r a
5663
-q

0 commit comments

Comments
 (0)