Skip to content

Commit f72a8c2

Browse files
committed
add test to check assembly package
1 parent 4530f0d commit f72a8c2

File tree

3 files changed

+108
-0
lines changed

3 files changed

+108
-0
lines changed

.github/workflows/assembly-test.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: "Assembly Package Test"
2+
on:
3+
workflow_call:
4+
inputs:
5+
java-matrix:
6+
description: "The java version to run the test on"
7+
type: string
8+
required: false
9+
default: '["8"]'
10+
python-matrix:
11+
description: "The python version to run the test on"
12+
type: string
13+
required: false
14+
default: '["3.9"]'
15+
os-matrix:
16+
description: "The operating system to run the test on"
17+
type: string
18+
required: false
19+
default: '["ubuntu-latest", "macos-13", "windows-latest"]'
20+
21+
env:
22+
FUNCTEST: RemoteUDFIT
23+
24+
jobs:
25+
assembly-include-test:
26+
timeout-minutes: 30
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
java: ${{ fromJSON(inputs.java-matrix) }}
31+
python-version: ${{ fromJSON(inputs.python-matrix) }}
32+
os: ${{ fromJSON(inputs.os-matrix) }}
33+
runs-on: ${{ matrix.os }}
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Environment dependence
37+
uses: ./.github/actions/dependence
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
java: ${{ matrix.java }}
41+
42+
- name: assembly include package
43+
run: mvn clean package -D skipTests -P !format -P release
44+
45+
- name: Get Startup Script suffix in Current OS
46+
id: script-suffix
47+
shell: bash
48+
run: |
49+
SUFFIX="sh"
50+
if [ "$RUNNER_OS" == "Windows" ]; then
51+
SUFFIX="bat"
52+
fi
53+
echo "suffix=$SUFFIX" >> $GITHUB_OUTPUT
54+
55+
- name: Save Workspace
56+
run: tree assembly/target/iginx-assembly-${{ env.VERSION }}-include >origin-tree.txt
57+
58+
- name: Run IGinX include Zookeeper with Pemjax
59+
run: |
60+
cd assembly/target/iginx-assembly-${{ env.VERSION }}-include
61+
./runIGinXOn1HostWithPemjax.${{ steps.script-suffix.outputs.suffix }}
62+
63+
- name: Get Cluster Info
64+
shell: bash
65+
run: |
66+
./client/target/iginx-client-0.7.0-SNAPSHOT/sbin/start_cli.${{ steps.script-suffix.outputs.suffix }} -e "show cluster info;" > cluster-info.txt
67+
cat cluster-info.txt
68+
LINE_COUNT=$(wc -l < cluster-info.txt)
69+
if [ $LINE_COUNT -ne 19 ]; then
70+
echo "Cluster info is not 19 lines"
71+
exit 1
72+
fi
73+
74+
- name: Run Simple Test
75+
shell: bash
76+
run: |
77+
mvn test -Dtest=SQLSessionIT#testShowColumns -DfailIfNoTests=false -P !format
78+
79+
- name: Show IGinX Log
80+
if: always()
81+
run: cat assembly/target/iginx-assembly-${{ env.VERSION }}-include/sbin/logs/iginx-latest.log
82+
83+
- name: Clean Up
84+
run: |
85+
cd assembly/target/iginx-assembly-${{ env.VERSION }}-include
86+
./stopIGinX.${{ steps.script-suffix.outputs.suffix }}
87+
./clearAllData.${{ steps.script-suffix.outputs.suffix }}
88+
89+
- name: Save Workspace
90+
run: tree assembly/target/iginx-assembly-${{ env.VERSION }}-include >final-tree.txt
91+
92+
- name: Compare Workspace
93+
shell: bash
94+
run: |
95+
diff origin-tree.txt final-tree.txt
96+
exit $?
97+
98+
- name: Show Origin Tree
99+
if: always()
100+
run: cat origin-tree.txt
101+
102+
- name: Show Final Tree
103+
if: always()
104+
run: cat final-tree.txt

.github/workflows/full-test-suite.yml

+2
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ jobs:
2424
uses: ./.github/workflows/DB-CE.yml
2525
remote-test:
2626
uses: ./.github/workflows/remote-test.yml
27+
assemebly-test:
28+
uses: ./.github/workflows/assembly-test.yml

.github/workflows/standard-test-suite.yml

+2
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ jobs:
3535
uses: ./.github/workflows/remote-test.yml
3636
with:
3737
metadata-matrix: '["zookeeper"]'
38+
assemebly-test:
39+
uses: ./.github/workflows/assembly-test.yml

0 commit comments

Comments
 (0)