forked from IGinX-THU/IGinX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
93 lines (86 loc) · 3.82 KB
/
action.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
name: "set context"
description: "set context"
inputs:
work-name:
description: "current work name"
required: false
default: client
shell:
description: "start shell"
required: false
default: client
DB-name:
description: "DB name"
required: false
default: IoTDB12
metadata:
description: "which metadata service to use"
required: false
default: zookeeper
runs:
using: "composite" # Mandatory parameter
steps:
- if: inputs.work-name=='stop-iginx-meta' || inputs.work-name=='restart-iginx-meta'
name: Stop IGinX
uses: ./.github/actions/iginxRunner
with:
if-stop: true
- if: inputs.work-name=='stop-iginx-meta' || inputs.work-name=='restart-iginx-meta'
name: Stop and clear Metadata Service
uses: ./.github/actions/metadataRunner
with:
if-stop: true
metadata: ${{ inputs.metadata }}
- if: inputs.work-name=='start-iginx-meta' || inputs.work-name=='restart-iginx-meta'
name: Run Metadata Service
uses: ./.github/actions/metadataRunner
with:
if-rerun: true
metadata: ${{ inputs.metadata }}
- if: inputs.work-name=='start-iginx-meta' || inputs.work-name=='restart-iginx-meta'
name: Start IGinX
uses: ./.github/actions/iginxRunner
- if: inputs.shell=='client-before'
name: Pre Test Client Export File
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_outfile.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_outfile.sh" "${{ inputs.DB-name }}" ${VERSION}
elif [ "$RUNNER_OS" == "Windows" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_outfile_windows.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_outfile_windows.sh" "${{ inputs.DB-name }}" ${VERSION}
elif [ "$RUNNER_OS" == "macOS" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_outfile_macos.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_outfile_macos.sh" "${{ inputs.DB-name }}" ${VERSION}
fi
- if: inputs.shell=='client-after'
name: Install wget and 7zip
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y p7zip-full
sudo apt-get install -y wget
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install 7zip -y
choco install wget -y
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install p7zip
brew install wget
fi
- if: inputs.shell=='client-after'
name: Pre Test Client Import File
shell: bash
run: |
wget https://github.com/IGinX-THU/IGinX-resources/raw/main/resources/bigcsv.7z
7z x bigcsv.7z
if [ "$RUNNER_OS" == "Linux" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_infile.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_infile.sh" ${VERSION}
elif [ "$RUNNER_OS" == "Windows" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_infile_windows.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_infile_windows.sh" ${VERSION}
elif [ "$RUNNER_OS" == "macOS" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_infile_macos.sh"
"${GITHUB_WORKSPACE}/.github/scripts/test/cli/test_infile_macos.sh" ${VERSION}
fi