From 2ecc87e927a8c3655f8b1ce7d8baa481a9ef5b16 Mon Sep 17 00:00:00 2001 From: mvogt Date: Tue, 25 Jun 2024 10:13:39 +0200 Subject: [PATCH] codacy complains about coverages files so we just ignore them. --- .codacy.yml | 2 ++ .github/workflows/run_tests_master.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.codacy.yml b/.codacy.yml index cad15b59..9823f0c7 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -7,3 +7,5 @@ exclude_paths: - 'pandapipes/networks/network_files/**' - '**.yml' - '**.rst' + - 'coverage.xml' + - '.coverage' \ No newline at end of file diff --git a/.github/workflows/run_tests_master.yml b/.github/workflows/run_tests_master.yml index b9880381..52430e67 100644 --- a/.github/workflows/run_tests_master.yml +++ b/.github/workflows/run_tests_master.yml @@ -39,6 +39,12 @@ jobs: if: ${{ matrix.python-version != '3.9' }} run: | python -m pytest + - name: Upload coverage to Codacy + if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'}} + uses: codacy/codacy-analysis-cli-action@master + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + upload: true - name: Test with numba if: ${{ matrix.python-version == '3.11' }} run: | @@ -49,12 +55,6 @@ jobs: run: | python -m pip install pytest-cov python -m pytest --cov=./ --cov-report=xml - - name: Upload coverage to Codacy - if: ${{ matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'}} - uses: codacy/codacy-analysis-cli-action@master - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - upload: true - name: Upload coverage to Codecov if: ${{ matrix.python-version == '3.9' }} uses: codecov/codecov-action@v4