Skip to content

Nightly - E2E SQL

Nightly - E2E SQL #671

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Nightly - E2E SQL
on:
schedule:
- cron: '0 15 * * 1-5' # Once a day between Monday and Friday. UTC time
workflow_dispatch:
concurrency:
group: e2e-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dspotless.apply.skip=true
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
jobs:
global-environment:
name: Import Global Environment
uses: ./.github/workflows/required-reusable.yml
prepare-e2e-artifacts:
name: Prepare E2E Artifacts
needs: global-environment
runs-on: ${{ needs.global-environment.outputs.GLOBAL_RUNS_ON }}
timeout-minutes: 40
steps:
- uses: actions/checkout@v6.0.1
- id: setup-build-environment
uses: ./.github/workflows/resources/actions/setup-build-environment
with:
java-version: 21
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
enable-docker-setup: 'true'
- name: Build E2E Image
run: ./mvnw -B clean install -am -pl test/e2e/sql -Pe2e.env.docker -DskipTests -Dspotless.apply.skip=true
- uses: ./.github/workflows/resources/actions/save-maven-cache
with:
cache-hit: ${{ steps.setup-build-environment.outputs.cache-hit }}
cache-primary-key: ${{ steps.setup-build-environment.outputs.cache-primary-key }}
- uses: ./.github/workflows/resources/actions/upload-source-snapshot
- uses: ./.github/workflows/resources/actions/upload-e2e-artifacts
e2e-sql:
name: E2E - SQL
needs: [ prepare-e2e-artifacts, global-environment ]
if: ${{ needs.global-environment.outputs.GLOBAL_JOB_ENABLED == 'true' }}
runs-on: ${{ needs.global-environment.outputs.GLOBAL_RUNS_ON }}
timeout-minutes: 200
strategy:
max-parallel: 15
fail-fast: false
matrix:
adapter: [ proxy, jdbc ]
mode: [ Standalone, Cluster ]
database: [ MySQL, PostgreSQL, openGauss ]
scenario: [ empty_rules, distsql_rdl, passthrough, db, tbl, encrypt, readwrite_splitting, shadow, mask, dbtbl_with_readwrite_splitting, dbtbl_with_readwrite_splitting_and_encrypt, sharding_and_encrypt, encrypt_and_readwrite_splitting, encrypt_shadow, readwrite_splitting_and_shadow, sharding_and_shadow, sharding_encrypt_shadow, mask_encrypt, mask_sharding, mask_encrypt_sharding, db_tbl_sql_federation ]
additional-options: [ '' ]
include:
- adapter: proxy
database: MySQL
scenario: passthrough
additional-options: '-Dmysql-connector-java.version=8.4.0'
- adapter: jdbc
database: Hive
scenario: encrypt
- adapter: jdbc
database: Hive
scenario: mask
exclude:
- adapter: jdbc
scenario: passthrough
- adapter: jdbc
mode: Cluster
- adapter: proxy
mode: Standalone
scenario: empty_rules
- adapter: proxy
mode: Standalone
scenario: distsql_rdl
- adapter: proxy
mode: Standalone
scenario: passthrough
steps:
- name: Logs
run: |
echo "runner.temp=${{ runner.temp }}"
echo "RUNNER_TEMP=$RUNNER_TEMP"
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE"
- name: Download Source Snapshot
uses: actions/download-artifact@v8
with:
name: source-snapshot
path: ${{ runner.temp }}/source-snapshot
- name: Restore Source Snapshot
run: |
find "$GITHUB_WORKSPACE" -mindepth 1 -delete 2>/dev/null || true
tar -xzf "$RUNNER_TEMP/source-snapshot/source-snapshot.tar.gz" -C "$GITHUB_WORKSPACE"
- uses: ./.github/workflows/resources/actions/setup-build-environment
with:
java-version: 21
cache-suffix: 'e2e-sql'
cache-save-enabled: 'false'
enable-docker-setup: 'true'
- uses: ./.github/workflows/resources/actions/download-e2e-artifacts
with:
load-docker-image: ${{ matrix.adapter == 'proxy' }}
- name: Run E2E Test
run: ./mvnw -nsu -B install -f test/e2e/sql/pom.xml -Dspotless.apply.skip=true -De2e.run.type=DOCKER -De2e.artifact.modes=${{ matrix.mode }} -De2e.artifact.adapters=${{ matrix.adapter }} -De2e.run.additional.cases=false -De2e.scenarios=${{ matrix.scenario }} -De2e.artifact.databases=${{ matrix.database }} ${{ matrix.additional-options }}