diff --git a/.github/workflows/build-and-test-daily.yaml b/.github/workflows/build-and-test-daily.yaml index 564894b70c..02dc04f45f 100644 --- a/.github/workflows/build-and-test-daily.yaml +++ b/.github/workflows/build-and-test-daily.yaml @@ -36,7 +36,8 @@ jobs: push-ccache: false cache-key-element: daily-build above: ${{ matrix.above }} - codecov-flag: daily-${{ matrix.rosdistro }} + upload-coverage: ${{ matrix.rosdistro == 'jazzy' && !matrix.above }} + codecov-flag: daily concurrency-group: build-and-test-daily-${{ matrix.rosdistro }}${{ matrix.above && '-above' || '' }}-${{ github.ref }}-${{ github.run_id }} runner: ${{ matrix.above && '["self-hosted","Linux","X64"]' || '["ubuntu-latest"]' }} diff --git a/.github/workflows/build-and-test-diff-reusable.yaml b/.github/workflows/build-and-test-diff-reusable.yaml index 6553f042c2..8ab3f77082 100644 --- a/.github/workflows/build-and-test-diff-reusable.yaml +++ b/.github/workflows/build-and-test-diff-reusable.yaml @@ -31,6 +31,10 @@ on: default: true required: false type: boolean + upload-coverage: + default: false + required: false + type: boolean env: CC: /usr/lib/ccache/gcc @@ -160,14 +164,16 @@ jobs: underlay-workspace: /opt/autoware - name: Upload coverage to CodeCov - if: ${{ steps.test.outputs.coverage-report-files != '' && !inputs.above }} - uses: codecov/codecov-action@v4 + if: ${{ steps.test.outputs.coverage-report-files != '' && inputs.upload-coverage }} + # No flag: a PR upload with the full-suite flag would replace the carried-forward baseline. + uses: codecov/codecov-action@v6 with: files: ${{ steps.test.outputs.coverage-report-files }} fail_ci_if_error: false verbose: true - flags: differential-${{ inputs.rosdistro }} token: ${{ secrets.codecov-token }} + disable_search: true + plugins: noop - name: Show disk space after the tasks run: df -h diff --git a/.github/workflows/build-and-test-reusable.yaml b/.github/workflows/build-and-test-reusable.yaml index 60e34a534c..0bbbc22423 100644 --- a/.github/workflows/build-and-test-reusable.yaml +++ b/.github/workflows/build-and-test-reusable.yaml @@ -40,6 +40,10 @@ on: type: string default: default required: false + upload-coverage: + type: boolean + default: false + required: false codecov-flag: type: string default: other @@ -177,16 +181,16 @@ jobs: underlay-workspace: /opt/autoware - name: Upload coverage to CodeCov - if: ${{ steps.test.outputs.coverage-report-files != '' && !inputs.above }} - uses: codecov/codecov-action@v5 + if: ${{ steps.test.outputs.coverage-report-files != '' && inputs.upload-coverage }} + uses: codecov/codecov-action@v6 with: files: ${{ steps.test.outputs.coverage-report-files }} - disable_search: true - plugins: noop fail_ci_if_error: false verbose: true flags: ${{ inputs.codecov-flag }} token: ${{ secrets.codecov-token }} + disable_search: true + plugins: noop - name: Show disk space after the tasks run: df -h diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 4174c932c1..e33dbe09b8 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -41,7 +41,8 @@ jobs: cache-key-element: build above: ${{ matrix.above }} enable-agnocast: ${{ matrix.enable-agnocast }} - codecov-flag: total-${{ matrix.rosdistro }}${{ matrix.enable-agnocast && '-agnocast' || '' }} + upload-coverage: ${{ matrix.rosdistro == 'jazzy' && !matrix.above && !matrix.enable-agnocast }} + codecov-flag: full-suite concurrency-group: build-and-test-${{ matrix.rosdistro }}${{ matrix.above && '-above' || '' }}${{ matrix.enable-agnocast && '-agnocast' || '' }}-${{ github.ref }}-${{ github.run_id }} runner: ${{ matrix.above && '["self-hosted","Linux","X64"]' || '["ubuntu-latest"]' }} diff --git a/.github/workflows/build-test-tidy-pr.yaml b/.github/workflows/build-test-tidy-pr.yaml index 8e8e76ad7f..ccc577c294 100644 --- a/.github/workflows/build-test-tidy-pr.yaml +++ b/.github/workflows/build-test-tidy-pr.yaml @@ -92,6 +92,7 @@ jobs: container: ghcr.io/autowarefoundation/autoware:core-dependencies-jazzy above: false run-condition: ${{ needs.require-label.outputs.result == 'true' }} + upload-coverage: true secrets: codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/codecov.yaml b/codecov.yaml index e8a113956e..7d10cb4f53 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -3,23 +3,21 @@ coverage: project: default: target: auto + informational: true patch: default: target: auto + informational: true comment: show_carryforward_flags: true flag_management: default_rules: - carryforward: true - statuses: - - name_prefix: project- - type: project - target: auto - - name_prefix: patch- - type: patch - target: auto + carryforward: false + individual_flags: + - name: full-suite + carryforward: true ignore: - "**/test/*" @@ -28,6 +26,7 @@ ignore: - tools/** - "**/examples/*" - "**/examples/**/*" + - "**/setup.py" component_management: individual_components: