From 19b9e71e4af803c6494321c3f0aa624a950f2bdb Mon Sep 17 00:00:00 2001 From: mvogt Date: Tue, 25 Jun 2024 10:23:56 +0200 Subject: [PATCH] removed a logic error from develop and removed a seperate run of codacy for master, since uploading the reports is enough. --- .codacy.yml | 4 +--- .github/workflows/run_tests_develop.yml | 2 +- .github/workflows/run_tests_master.yml | 11 +++++------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.codacy.yml b/.codacy.yml index 9823f0c7..b999552e 100644 --- a/.codacy.yml +++ b/.codacy.yml @@ -6,6 +6,4 @@ exclude_paths: - 'tutorials/**' - 'pandapipes/networks/network_files/**' - '**.yml' - - '**.rst' - - 'coverage.xml' - - '.coverage' \ No newline at end of file + - '**.rst' \ No newline at end of file diff --git a/.github/workflows/run_tests_develop.yml b/.github/workflows/run_tests_develop.yml index 8c129a3f..e7ebdd08 100644 --- a/.github/workflows/run_tests_develop.yml +++ b/.github/workflows/run_tests_develop.yml @@ -55,7 +55,7 @@ jobs: uses: codecov/codecov-action@v4 with: verbose: true - dry_run: ${{ github.ref == 'refs/heads/develop' && 'false' || 'true' }} + dry_run: ${{ github.ref != 'refs/heads/develop' }} exclude: | '**/test/**' '**/__init__.py' diff --git a/.github/workflows/run_tests_master.yml b/.github/workflows/run_tests_master.yml index 52430e67..08ed959f 100644 --- a/.github/workflows/run_tests_master.yml +++ b/.github/workflows/run_tests_master.yml @@ -39,12 +39,6 @@ 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: | @@ -55,6 +49,11 @@ 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'}} + env: + CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} + run: bash <(curl -Ls https://coverage.codacy.com/get.sh) - name: Upload coverage to Codecov if: ${{ matrix.python-version == '3.9' }} uses: codecov/codecov-action@v4