Files
MapLibreParticleLab/.github/workflows/upload-coverage.yml
dependabot[bot] 2055a06fe0 Bump the github-actions group across 1 directory with 18 updates (#4196)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
2026-03-31 22:17:14 +00:00

60 lines
1.7 KiB
YAML

name: upload-coverage
on:
workflow_run:
workflows: [linux-ci]
types:
- completed
jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_run: ${{ !steps.parent_workflow.outputs.was_skipped_or_cancelled }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
with:
sparse-checkout: |
.github
.nvmrc
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v4
with:
node-version-file: '.nvmrc'
- run: npm install
- name: Get parent workflow result
id: parent_workflow
run: node .github/scripts/check-job-skipped.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEST_RUN_ID: ${{ github.event.workflow_run.id }}
JOB_NAME: linux-coverage
upload-coverage:
needs: pre_job
if: needs.pre_job.outputs.should_run == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
with:
persist-credentials: false
- uses: ./.github/actions/download-workflow-run-artifact
with:
artifact-name: coverage-report
expect-files: "_coverage_report.dat"
- name: Upload coverage report
if: '!cancelled()'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
override_commit: ${{ github.event.workflow_run.head_sha }}
override_pr: ${{ github.event.workflow_run.pull_requests[0].number }}
token: ${{ secrets.CODECOV_TOKEN }}
files: "_coverage_report.dat"
fail_ci_if_error: true
verbose: true