Ci/cache iotdb #1379
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |