-
Notifications
You must be signed in to change notification settings - Fork 724
96 lines (96 loc) · 2.62 KB
/
pd-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
name: PD Test
on:
push:
branches:
- master
- release-4.0
- release-5.*
- release-6.*
- release-7.*
- release-8.*
pull_request:
branches:
- master
- release-4.0
- release-5.*
- release-6.*
- release-7.*
- release-8.*
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
chunks:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- worker_id: 1
name: 'Unit Test(1)'
- worker_id: 2
name: 'Unit Test(2)'
- worker_id: 3
name: 'Unit Test(3)'
- worker_id: 4
name: 'Tests(1)'
- worker_id: 5
name: 'Tests(2)'
- worker_id: 6
name: 'Tools Test'
- worker_id: 7
name: 'Client Integration Test'
- worker_id: 8
name: 'TSO Integration Test'
- worker_id: 9
name: 'MicroService Integration(!TSO)'
- worker_id: 10
name: 'MicroService Integration(TSO)'
outputs:
job-total: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: ${{ matrix.name }}
env:
WORKER_ID: ${{ matrix.worker_id }}
run: |
make ci-test-job JOB_INDEX=$WORKER_ID
mv covprofile covprofile_$WORKER_ID
if [ -f junitfile ]; then
cat junitfile
fi
- name: Upload coverage result ${{ matrix.worker_id }}
uses: actions/upload-artifact@v4
with:
name: cover-reports-${{ matrix.worker_id }}
path: covprofile_${{ matrix.worker_id }}
report-coverage:
needs: chunks
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download chunk report
uses: actions/download-artifact@v4
with:
pattern: cover-reports-*
merge-multiple: true
- name: Merge
env:
TOTAL_JOBS: ${{needs.chunks.outputs.job-total}}
run: |
for i in $(seq 1 $TOTAL_JOBS); do cat covprofile_$i >> covprofile; done
sed -i "/failpoint_binding/d" covprofile
# only keep the first line(`mode: aomic`) of the coverage profile
sed -i '2,${/mode: atomic/d;}' covprofile
- name: Send coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV }}
file: ./covprofile
flags: unittests
name: codecov-umbrella