-
Notifications
You must be signed in to change notification settings - Fork 26
56 lines (46 loc) · 1.29 KB
/
tarpaulin.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
49
50
51
52
53
54
55
56
name: tarpaulin
on:
pull_request:
paths:
- '**/*.lock'
- '**/*.rs'
- '**/*.toml'
- '**/tarpaulin.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name == 'main' && github.sha || github.ref }}
cancel-in-progress: true
permissions:
pull-requests: write
jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- name: cargo
uses: taiki-e/[email protected]
with:
tool: cargo-tarpaulin
- name: python
uses: actions/[email protected]
with:
python-version: 3.11
- name: checkout
uses: actions/[email protected]
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: requirements
run: echo pycobertura >> requirements.txt
- name: dependencies
uses: py-actions/[email protected]
- name: tarpaulin
run: |
cargo tarpaulin \
&& echo '```' >> message.txt \
&& pycobertura show cobertura.xml >> message.txt \
&& echo '```' >> message.txt
- name: comment
uses: thollander/[email protected]
with:
comment_tag: tarpaulin
filePath: message.txt