-
Notifications
You must be signed in to change notification settings - Fork 126
159 lines (152 loc) · 4.82 KB
/
tests.yaml
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Tests
on:
pull_request:
branches: [main]
merge_group:
branches: [main]
push:
branches: [main]
jobs:
tests-linux:
strategy:
matrix:
package: [
"tremor-api",
# "tremor-cli", we have no unit tests in tremor-cli
"tremor-codec",
"tremor-common",
"tremor-influx",
"tremor-interceptor",
"tremor-pipeline",
"tremor-script",
"tremor-value",
"tremor-system",
"tremor-runtime",
"tremor-connectors-object-storage",
"tremor-connectors-test-helpers",
]
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v4
- name: Install deps
run: sudo apt-get -qy update && sudo apt-get install -y libssl-dev libssl1.1; sudo apt-get clean
- name: Install llvm-tools-preview
run: rustup component add llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
env:
PROPTEST_CASES: 2500
RUSTFLAGS: -D warnings -C target-feature=+avx,+avx2,+sse4.2
RUST_BACKTRACE: full
run: cargo llvm-cov -p ${{ matrix.package }} --lcov --output-path lcov.txt
- name: Generate matrix name
run: |
flags="${{ matrix.package }}"
flags="${flags//[- ]/}"
echo "$flags"
echo "flags=$flags" >> $GITHUB_ENV
- name: Upload coverage to Codecov
uses: Wandalen/wretry.action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ env.flags }}
with:
action: codecov/codecov-action@v4
attempt_limit: 6
attempt_delay: 10000
with: |
files: ./lcov.txt
flags: unittests,${{ env.flags }}
fail_ci_if_error: ${{ github.event_name == 'pull_request' }}
verbose: true
connectors-linux:
strategy:
matrix:
package:
[
"tremor-connectors",
"tremor-connectors-aws",
"tremor-connectors-azure",
"tremor-connectors-gcp",
"tremor-connectors-otel",
]
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v4
- name: Install deps
run: sudo apt-get -qy update && sudo apt-get install -y libssl-dev libssl1.1; sudo apt-get clean
- name: Install llvm-tools-preview
run: rustup component add llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
env:
PROPTEST_CASES: 2500
RUSTFLAGS: -D warnings -C target-feature=+avx,+avx2,+sse4.2
RUST_BACKTRACE: full
run: cargo llvm-cov -p ${{ matrix.package }} --lcov --output-path lcov.txt --features integration-harness
- name: Generate matrix name
run: |
flags="${{ matrix.package }}"
flags="${flags//[- ]/}"
echo "$flags"
echo "flags=$flags" >> $GITHUB_ENV
- name: Upload coverage to Codecov
uses: Wandalen/wretry.action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ env.flags }}
with:
action: codecov/codecov-action@v4
attempt_limit: 6
attempt_delay: 10000
with: |
files: ./lcov.txt
flags: unittests,${{ env.flags }}
fail_ci_if_error: ${{ github.event_name == 'pull_request' }}
verbose: true
core-tests:
if: ${{ always() }}
name: Core Tests
runs-on: ubuntu-latest
needs: [tests-linux]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}
connector-tests:
if: ${{ always() }}
name: Connector Tests
runs-on: ubuntu-latest
needs: [connectors-linux]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}
tests:
if: ${{ always() }}
name: Tests
runs-on: ubuntu-latest
needs: [connector-tests, core-tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}