forked from maplibre/maplibre-native
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.47 KB
/
upload-coverage.yml
File metadata and controls
56 lines (48 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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@v4
with:
sparse-checkout: |
.github
.nvmrc
- uses: actions/setup-node@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@v4
- 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@v5
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