-
-
Notifications
You must be signed in to change notification settings - Fork 4
145 lines (141 loc) · 5.01 KB
/
coverage.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: coverage
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'COPYRIGHT'
- 'LICENSE*'
- '**.md'
- '**.txt'
- 'art'
pull_request:
paths-ignore:
- 'README.md'
- 'COPYRIGHT'
- 'LICENSE*'
- '**.md'
- '**.txt'
- 'art'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
coverage-report:
name: Generate Coverage for ${{ matrix.crate }}-${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- crate: core
features: "test,metrics"
name: "memberlist-core"
- crate: types
features: "metrics,encryption"
name: "memberlist-types"
- crate: memberlist
features: "test,tokio,tcp,compression,encryption,metrics"
name: "memberlist-tcp-compression-encryption"
- crate: memberlist
features: "test,tokio,tls,compression,encryption,metrics"
name: "memberlist-tls-compression-encryption"
- crate: memberlist
features: "test,tokio,native-tls,compression,encryption,metrics"
name: "memberlist-native-tls-compression-encryption"
- crate: memberlist
features: "test,tokio,tcp,compression,metrics"
name: "memberlist-tcp-compression-only"
- crate: memberlist
features: "test,tokio,tls,compression,metrics"
name: "memberlist-tls-compression-only"
- crate: memberlist
features: "test,tokio,native-tls,compression,metrics"
name: "memberlist-native-tls-compression-only"
- crate: memberlist
features: "test,tokio,tcp,encryption,metrics"
name: "memberlist-tcp-encryption-only"
- crate: memberlist
features: "test,tokio,tls,compression,metrics"
name: "memberlist-tls-encryption-only"
- crate: memberlist
features: "test,tokio,native-tls,encryption,metrics"
name: "memberlist-native-tls-encryption-only"
- crate: memberlist
features: "test,tokio,tcp,metrics"
name: "memberlist-tcp"
- crate: memberlist
features: "test,tokio,tls,metrics"
name: "memberlist-tls"
- crate: memberlist
features: "test,tokio,native-tls,metrics"
name: "memberlist-native-tls"
- crate: memberlist
features: "test,tokio,quinn,compression,metrics"
name: "memberlist-quinn-compression"
- crate: memberlist
features: "test,tokio,quinn,metrics"
name: "memberlist-quinn"
- crate: transports/net
features: "test,tokio,tcp,compression,metrics"
name: "net-tcp-compression-only"
- crate: transports/net
features: "test,tokio,tcp,encryption,metrics"
name: "net-tcp-encryption-only"
- crate: transports/net
features: "test,tokio,tcp,metrics"
name: "net-tcp"
- crate: transports/net
features: "test,tokio,tcp,compression,encryption,metrics"
name: "net-tcp-compression-and-encryption"
- crate: transports/net
features: "test,tokio,tls,compression,encryption,metrics"
name: "net-tls"
- crate: transports/net
features: "test,tokio,native-tls,compression,encryption,metrics"
name: "net-native-tls"
- crate: transports/quic
features: "test,tokio,quinn,compression,metrics"
name: "quic-quinn"
- crate: transports/quic
features: "test,tokio,s2n,compression,metrics"
name: "quic-s2n"
steps:
- uses: actions/checkout@v4
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Setup loopback interface
run: ci/setup_subnet_ubuntu.sh
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Run Coverage and Generate Report
run: |
cargo tarpaulin --out xml --no-default-features --features ${{ matrix.features }} --no-fail-fast --output-dir $PWD -j 1
working-directory: ${{ matrix.crate }}
continue-on-error: true
- name: Upload Coverage Report as Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: ${{ matrix.crate }}/cobertura.xml
upload-codecov:
needs: coverage-report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all coverage reports
uses: actions/download-artifact@v4
with:
path: reports/
- name: List contents of the reports directory
run: ls -a reports
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
directory: reports
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}