Skip to content

Nightly - E2E

Nightly - E2E #744

Workflow file for this run

#
# 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
on:
schedule:
- cron: '0 20 */1 * *' # once a day. UTC time
workflow_dispatch:
concurrency:
group: it-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Djacoco.skip=true -Dspotless.apply.skip=true
REPOSITORY_NAME: shardingsphere
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
jobs:
build-it-image:
if: github.repository == 'apache/shardingsphere'
name: Build IT image
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ env.REPOSITORY_NAME }}-maven-third-party-it-cache-${{ github.sha }}
restore-keys: |
${{ env.REPOSITORY_NAME }}-maven-third-party-it-cache-
${{ env.REPOSITORY_NAME }}-maven-third-party-
- name: Build IT image
run: ./mvnw -B clean install -am -pl test/e2e/sql -Pit.env.docker -DskipTests -Dspotless.apply.skip=true
- name: Verify SQL CI Run
run: ./mvnw -B install -pl test/e2e/sql -Dspotless.apply.skip=true
- name: Save IT image
run: docker save -o /tmp/${{ env.REPOSITORY_NAME }}-proxy-test.tar apache/shardingsphere-proxy-test:latest
- uses: actions/upload-artifact@v3
with:
name: it-image
path: /tmp/${{ env.REPOSITORY_NAME }}-proxy-test.tar
retention-days: 1
it-empty-rule:
name: empty rule
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build-it-image
strategy:
max-parallel: 2
fail-fast: false
matrix:
adapter: [ proxy, jdbc ]
database: [ MySQL, PostgreSQL, openGauss ]
scenario: [ empty_rules, rdl_empty_rules, passthrough ]
exclude:
- adapter: jdbc
scenario: passthrough
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ env.REPOSITORY_NAME }}-maven-third-party-it-cache-${{ github.sha }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Download IT image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v3
with:
name: it-image
path: /tmp/
- name: Load IT image
if: matrix.adapter == 'proxy'
run: docker load -i /tmp/${{ env.REPOSITORY_NAME }}-proxy-test.tar
- name: Run E2E Test
run: ./mvnw -nsu -B install -f test/e2e/sql/pom.xml -Dspotless.apply.skip=true -Dit.run.modes=Cluster -Dit.scenarios=${{ matrix.scenario }} -Dit.cluster.adapters=${{ matrix.adapter }} -Dit.cluster.databases=${{ matrix.database }} -Dit.cluster.env.type=DOCKER
it-single-rule:
name: single rule
needs: it-empty-rule
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
max-parallel: 2
fail-fast: false
matrix:
adapter: [ proxy, jdbc ]
mode: [ standalone, Cluster ]
database: [ MySQL, PostgreSQL, openGauss ]
scenario: [ db, tbl, encrypt, readwrite_splitting, shadow ]
exclude:
- adapter: jdbc
mode: Cluster
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ env.REPOSITORY_NAME }}-maven-third-party-it-cache-${{ github.sha }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Download IT image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v3
with:
name: it-image
path: /tmp/
- name: Load IT image
if: matrix.adapter == 'proxy'
run: docker load -i /tmp/${{ env.REPOSITORY_NAME }}-proxy-test.tar
- name: Run E2E Test
run: ./mvnw -nsu -B install -f test/e2e/sql/pom.xml -Dspotless.apply.skip=true -Dit.cluster.env.type=DOCKER -Dit.cluster.adapters=${{ matrix.adapter }} -Dit.run.modes=${{ matrix.mode }} -Dit.cluster.databases=${{ matrix.database }} -Dit.scenarios=${{ matrix.scenario }}
it-mixture-rule:
name: mixture rule
needs: it-single-rule
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
max-parallel: 2
fail-fast: false
matrix:
adapter: [ proxy, jdbc ]
mode: [ Standalone, Cluster ]
database: [ MySQL, PostgreSQL, openGauss ]
scenario: [ 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 ]
exclude:
- adapter: jdbc
mode: Cluster
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ env.REPOSITORY_NAME }}-maven-third-party-it-cache-${{ github.sha }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
- name: Download IT image
if: matrix.adapter == 'proxy'
uses: actions/download-artifact@v3
with:
name: it-image
path: /tmp/
- name: Load IT image
if: matrix.adapter == 'proxy'
run: docker load -i /tmp/${{ env.REPOSITORY_NAME }}-proxy-test.tar
- name: Run E2E Test
run: ./mvnw -nsu -B install -f test/e2e/sql/pom.xml -Dspotless.apply.skip=true -Dit.cluster.env.type=DOCKER -Dit.cluster.adapters=${{ matrix.adapter }} -Dit.run.modes=${{ matrix.mode }} -Dit.cluster.databases=${{ matrix.database }} -Dit.scenarios=${{ matrix.scenario }}