-
Notifications
You must be signed in to change notification settings - Fork 17
171 lines (151 loc) · 6.19 KB
/
standalone-test.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
name: "Union Database Test"
on:
pull_request:
types: [opened, reopened]
branches:
- main
env:
VERSION: 0.6.0-SNAPSHOT
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Union-DB-Test:
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
java: [8]
python-version: ["3.9"]
os: [ubuntu-latest, macos-13, windows-latest]
DB-name:
[
"IoTDB12",
"InfluxDB",
"Parquet",
"PostgreSQL",
"FileSystem",
# "Redis",
"MongoDB",
]
metadata: [zookeeper]
runs-on: ${{ matrix.os }}
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
- name: Change IGinX config
uses: ./.github/actions/confWriter
with:
DB-name: ${{ matrix.DB-name }}
Set-Filter-Fragment-OFF: "true"
Metadata: ${{ matrix.metadata }}
# start udf path test first to avoid being effected
- name: Start IGinX
uses: ./.github/actions/iginxRunner
with:
version: ${VERSION}
if-test-udf: "true"
- name: Run UDF path test
if: always()
shell: bash
run: |
mvn test -q -Dtest=UDFPathIT -DfailIfNoTests=false -P-format
if [ "$RUNNER_OS" == "Linux" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_py_register.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_py_register.sh"
elif [ "$RUNNER_OS" == "Windows" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_py_register_windows.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_py_register_windows.sh"
elif [ "$RUNNER_OS" == "macOS" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_py_register_macos.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_py_register_macos.sh"
fi
- name: set client test context
uses: ./.github/actions/context
with:
work-name: restart-iginx-meta
metadata: ${{ matrix.metadata }}
- name: set client test context
uses: ./.github/actions/context
with:
DB-name: ${{ matrix.DB-name }}
shell: client-before
# large image export only tested in FileSystem and Parquet
- name: Test Client Export File
if: always()
shell: bash
run: |
if [[ "${{ matrix.DB-name }}" == "FileSystem" || "${{ matrix.DB-name }}" == "Parquet" ]]; then
mvn test -q -Dtest=ExportFileIT -DfailIfNoTests=false -P-format
else
mvn test -q -Dtest=ExportFileIT#checkExportByteStream -DfailIfNoTests=false -P-format
mvn test -q -Dtest=ExportFileIT#checkExportCsv -DfailIfNoTests=false -P-format
fi
- name: Stop IGinX and Metadata, Clear Metadata Data, then Start Them
uses: ./.github/actions/context
with:
work-name: restart-iginx-meta
metadata: ${{ matrix.metadata }}
- name: set client test context
uses: ./.github/actions/context
with:
shell: client-after
- name: Test Client Import File
if: always()
shell: bash
run: |
mvn test -q -Dtest=ImportFileIT -DfailIfNoTests=false -P-format
- name: clean metadata and restart IGinX
uses: ./.github/actions/context
with:
work-name: restart-iginx-meta
metadata: ${{ matrix.metadata }}
- name: TestController IT
if: always()
shell: bash
env:
METADATA_STORAGE: ${{ matrix.metadata }}
run: |
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/test_union.sh"
mvn test -q -Dtest=Controller -DfailIfNoTests=false -P-format
- name: Change IGinX config
uses: ./.github/actions/confWriter
with:
Set-Key-Range-Test-Policy: "true"
- name: clean metadata and restart IGinX
uses: ./.github/actions/context
with:
work-name: restart-iginx-meta
metadata: ${{ matrix.metadata }}
- name: FilterFragmentRuleTest IT
if: always()
shell: bash
run: |
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/test_union.sh"
mvn test -q -Dtest=SQLSessionIT#testFilterFragmentOptimizer -DfailIfNoTests=false -P-format
- name: Show test result
if: always()
shell: bash
run: |
cat ${GITHUB_WORKSPACE}/test/src/test/resources/testResult.txt
- name: Show IGinX log
if: always()
shell: bash
run: |
cat iginx-*.log