Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
AddCoverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Tugark committed Sep 2, 2024
1 parent 01bcdcd commit 4b94aaf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ jobs:
sonarcloud:
name: SonarCloud
uses: ./.github/workflows/sonar-analysis.yml
needs: python
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ jobs:
pipenv install
- name: Test with pytest
run: |
pipenv run pytest --cov --cov-report=xml
pipenv run pytest --cov --cov-report=xml
- name: Cache coverage report
uses: actions/cache@v4
with:
path: coverage.xml
key: python-coverage-report-${{ github.sha }}-${{ github.run_id }}
5 changes: 5 additions & 0 deletions .github/workflows/sonar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Restore cached coverage report
uses: actions/cache@v4
with:
path: coverage.xml
key: python-coverage-report-${{ github.sha }}-${{ github.run_id }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down

0 comments on commit 4b94aaf

Please sign in to comment.