From 6f9e2456f72b0c5b5e6b9c854555579429133204 Mon Sep 17 00:00:00 2001 From: Lukas Merz Date: Mon, 2 Sep 2024 15:50:07 +0200 Subject: [PATCH] AddCoverage --- .github/workflows/python-tests.yml | 7 ++++++- .github/workflows/sonar-analysis.yml | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 2e20e19..959366e 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -22,4 +22,9 @@ jobs: pipenv install - name: Test with pytest run: | - pipenv run pytest --cov --cov-report=xml \ No newline at end of file + 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 }} \ No newline at end of file diff --git a/.github/workflows/sonar-analysis.yml b/.github/workflows/sonar-analysis.yml index e783237..0685a08 100644 --- a/.github/workflows/sonar-analysis.yml +++ b/.github/workflows/sonar-analysis.yml @@ -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: