-
Notifications
You must be signed in to change notification settings - Fork 734
55 lines (50 loc) · 1.64 KB
/
Copy path_codecov.yml
File metadata and controls
55 lines (50 loc) · 1.64 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
---
name: codecov
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
description: Token to upload reports to Codecov. Required if `upload_report` is on.
inputs:
post_comment:
description: 'Set to true to post a test summary comment on the PR.'
type: boolean
required: true
upload_report:
description: 'Set to true to upload test reports to Codecov.'
type: boolean
required: true
report-name:
description: 'Name to use when uploading reports to Codecov.'
type: string
required: false
default: 'CI Test Results'
jobs:
report_summary:
name: Aggregate test results
runs-on: ubuntu-4
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Download JUnit reports
uses: actions/download-artifact@v7
with:
pattern: junit-reports-*
path: downloaded-reports/
- name: Post test summary comment
if: ${{ inputs.post_comment && github.event_name == 'pull_request' }}
uses: codecov/basic-test-results@c46ff461955b5cd6eb57cbe9ff22f3b77fc15824 # v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
directory: 'downloaded-reports/'
- name: Upload test results to Codecov
if: ${{ inputs.upload_report }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: 'downloaded-reports/'
name: ${{ inputs.report-name }}