-
Notifications
You must be signed in to change notification settings - Fork 61
/
action.yml
48 lines (42 loc) 路 1.1 KB
/
action.yml
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
---
name: Coverage
inputs:
token:
description: "Codecov token"
required: true
kind:
description: "Test kind (e2e or unit)"
required: true
description: Gather and report coverage to Codecov
runs:
using: "composite"
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install coverage
run: |
pip install coverage[toml]
shell: bash
- name: Download coverages
uses: actions/download-artifact@v3
with:
name: ${{ inputs.kind }}-coverage
path: ./
- name: Combine coverages
run: coverage combine
shell: bash
- name: Show coverage report
run: coverage report -m
shell: bash
- name: Prepare coverage report
run: coverage xml
shell: bash
- name: Upload coverage report do Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ inputs.token }}
files: ./coverage.xml
flags: ${{ inputs.kind }}
fail_ci_if_error: false