diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index af2ea9480cc..69964c3a902 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,20 +7,14 @@ on: pull_request: jobs: - run: - runs-on: ${{ matrix.os }} - strategy: - matrix: - python-version: [ '3.9' ] - os: [ ubuntu-latest ] - + generate_and_upload_report: + name: Generate and upload coverage report + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + - uses: actions/setup-python@v3 with: - python-version: ${{ matrix.python-version }} + python-version: 3.8 - name: Install dependencies run: | @@ -34,17 +28,15 @@ jobs: coverage combine coverage xml - - name: Code Coverage Summary Report - uses: irongut/CodeCoverageSummary@v1.2.0 + - name: Upload to Codecov + uses: codecov/codecov-action@v3 with: - filename: coverage.xml - format: markdown - badge: true - output: console + token: ${{ secrets.CODECOV_PROJECT_TOKEN }} # during `pull_request` event this field is empty + files: ./coverage.xml - - uses: actions/upload-artifact@v2 + - name: Upload to Codacy + if: github.event_name == 'push' + uses: codacy/codacy-coverage-reporter-action@v1 with: - name: coverage_report - path: ./coverage.xml - - + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: ./coverage.xml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 3f1795c3647..5cf0dcb7876 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/setup-python@v3 with: - python-version: '3.8' + python-version: 3.8 - name: Install dependencies run: | diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index d9f21157f45..9f49f1bd613 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -11,8 +11,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ['3.8'] - os: [macos-latest, windows-latest, ubuntu-latest] + python-version: [ '3.8' ] + os: [ macos-latest, windows-latest, ubuntu-latest ] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/upload_coverage.yml b/.github/workflows/upload_coverage.yml deleted file mode 100644 index 72e15c9bab5..00000000000 --- a/.github/workflows/upload_coverage.yml +++ /dev/null @@ -1,32 +0,0 @@ -# See: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ -name: Upload Coverage - -on: - workflow_run: - workflows: [ 'Coverage' ] - types: - - completed - -jobs: - upload: - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' - - steps: - - name: Download coverage report - uses: dawidd6/action-download-artifact@v2 - with: - workflow: coverage.yml - name: coverage_report - - - name: Upload to Codacy - uses: codacy/codacy-coverage-reporter-action@v1 - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: ./coverage.xml - - - name: Upload to Codecov - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_PROJECT_TOKEN }} - files: ./coverage.xml