-
Notifications
You must be signed in to change notification settings - Fork 16
197 lines (170 loc) · 7.55 KB
/
DB-CE.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: "Capacity-Expansion-Test"
on:
workflow_call:
inputs:
java-matrix:
description: "The java version to run the test on"
type: string
required: false
default: '["8"]'
python-matrix:
description: "The python version to run the test on"
type: string
required: false
default: '["3.9"]'
os-matrix:
description: "The operating system to run the test on"
type: string
required: false
default: '["ubuntu-latest", "macos-latest", "windows-latest"]'
metadata-matrix:
description: "The metadata to run the test on"
type: string
required: false
default: '["zookeeper", "etcd"]'
db-matrix:
description: "The database to run the test on"
type: string
required: false
default: '["IoTDB12", "InfluxDB", "FileSystem", "PostgreSQL", "Redis", "MongoDB", "MySQL"]'
env:
FUNCTEST: NewSessionIT,SQLCompareIT,TagIT,RestIT,TransformIT,UDFIT,RestAnnotationIT,SQLSessionIT,SQLSessionPoolIT,SessionV2IT,SessionIT,SessionPoolIT,CompactionIT,TimePrecisionIT,PySessionIT
jobs:
DB-CE:
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
java: ${{ fromJSON(inputs.java-matrix) }}
python-version: ${{ fromJSON(inputs.python-matrix) }}
os: ${{ fromJSON(inputs.os-matrix) }}
metadata: ${{ fromJSON(inputs.metadata-matrix) }}
DB-name: ${{ fromJSON(inputs.db-matrix) }}
runs-on: ${{ matrix.os }}
env:
METADATA_STORAGE: ${{ matrix.metadata }}
steps:
- uses: actions/checkout@v4
- name: Environment dependence
uses: ./.github/actions/dependence
with:
python-version: ${{ matrix.python-version }}
java: ${{ matrix.java }}
- name: Run Metadata
uses: ./.github/actions/metadataRunner
with:
metadata: ${{ matrix.metadata }}
- name: Run DB
uses: ./.github/actions/dbRunner
with:
DB-name: ${{ matrix.DB-name }}
- name: Install IGinX with Maven
shell: bash
run: |
mvn clean package -DskipTests -P-format -q
# 第 1 阶段测试开始==========================================
- name: Prepare CapExp environment oriHasDataExpHasData
uses: ./.github/actions/capacityExpansionUnionTest
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: oriHasDataExpHasData
- name: oriHasDataExpHasData IT
shell: bash
run: |
mvn test -q -Dtest=${{ matrix.DB-name }}CapacityExpansionIT#oriHasDataExpHasData -DfailIfNoTests=false -P-format
- name: Clear history data
uses: ./.github/actions/dbWriter
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: clearHistoryData
- name: oriHasDataExpHasData Normal IT
shell: bash
run: |
mvn test -q -Dtest=${FUNCTEST} -DfailIfNoTests=false -P-format
# 第 2 阶段测试开始==========================================
- name: Prepare CapExp environment oriNoDataExpNoData
uses: ./.github/actions/capacityExpansionUnionTest
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: oriNoDataExpNoData
- name: oriNoDataExpNoData IT
shell: bash
run: |
mvn test -q -Dtest=${{ matrix.DB-name }}CapacityExpansionIT#oriNoDataExpNoData -DfailIfNoTests=false -P-format
- name: Clear history data
uses: ./.github/actions/dbWriter
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: clearHistoryData
- name: oriNoDataExpNoData Normal IT
shell: bash
run: |
mvn test -q -Dtest=${FUNCTEST} -DfailIfNoTests=false -P-format
# 第 3 阶段测试开始==========================================
- name: Prepare CapExp environment oriHasDataExpNoData
uses: ./.github/actions/capacityExpansionUnionTest
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: oriHasDataExpNoData
- name: oriHasDataExpNoData IT
shell: bash
run: |
mvn test -q -Dtest=${{ matrix.DB-name }}CapacityExpansionIT#oriHasDataExpNoData -DfailIfNoTests=false -P-format
- name: Clear history data
uses: ./.github/actions/dbWriter
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: clearHistoryData
- name: oriHasDataExpNoData Normal IT
shell: bash
run: |
mvn test -q -Dtest=${FUNCTEST} -DfailIfNoTests=false -P-format
# 第 4 阶段测试开始==========================================
- name: Prepare CapExp environment oriNoDataExpHasData
uses: ./.github/actions/capacityExpansionUnionTest
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: oriNoDataExpHasData
- name: oriNoDataExpHasData IT
shell: bash
run: |
mvn test -q -Dtest=${{ matrix.DB-name }}CapacityExpansionIT#oriNoDataExpHasData -DfailIfNoTests=false -P-format
- name: Clear history data
uses: ./.github/actions/dbWriter
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: clearHistoryData
- name: oriNoDataExpHasData Normal IT
shell: bash
run: |
mvn test -q -Dtest=${FUNCTEST} -DfailIfNoTests=false -P-format
# 测试只读节点===============================================
- name: Prepare CapExp environment for testReadOnly
uses: ./.github/actions/capacityExpansionUnionTest
with:
DB-name: ${{ matrix.DB-name }}
Test-Way: oriHasDataExpHasData
Read-Only: true
- name: Run testReadOnly
shell: bash
env:
SERVICE_DIR: "/home/runner/work/IGinX/IGinX/.github/actions/service"
SERVICE_DIR_MAC: "/Users/runner/work/IGinX/IGinX/.github/actions/service"
SERVICE_DIR_WIN: "/d/a/IGinX/IGinX/.github/actions/service"
run: |
mvn test -q -Dtest=${{ matrix.DB-name }}CapacityExpansionIT#testReadOnly -DfailIfNoTests=false -P-format
mvn test -q -Dtest=${FUNCTEST} -DfailIfNoTests=false -P-format
- name: Show IGinX log
if: always()
shell: bash
run: |
cat iginx-*.log
- if: always()
name: Show DB Logs on Windows
uses: ./.github/actions/dbLog
with:
DB-name: ${{ matrix.DB-name }}
- uses: codecov/codecov-action@v1
with:
file: ./**/target/site/jacoco/jacoco.xml
name: codecov