| # |
| # 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: Scaling Integration Test |
| |
| on: |
| push: |
| branches: [ master, dev ] |
| paths: |
| - '.github/workflows/it-scaling.yml' |
| - 'shardingsphere-infra/shardingsphere-infra-common/src/main/**' |
| - 'shardingsphere-mode/**/src/main/**' |
| - 'shardingsphere-proxy/**/src/main/**' |
| - 'shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/**' |
| - '**/*-distsql*/**/src/main/**' |
| - 'shardingsphere-kernel/shardingsphere-data-pipeline/**/src/main/**' |
| - 'shardingsphere-features/**/src/main/**/scaling/**' |
| - '**/src/main/**/data/pipeline/**' |
| - '**/src/main/resources/META-INF/services/*.data.pipeline.*' |
| - '!shardingsphere-test/**' |
| - 'shardingsphere-test/shardingsphere-integration-test/**' |
| - '!shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/**' |
| - '!*.md' |
| pull_request: |
| branches: [ master ] |
| paths: |
| - '.github/workflows/it-scaling.yml' |
| - 'shardingsphere-infra/shardingsphere-infra-common/src/main/**' |
| - 'shardingsphere-mode/**/src/main/**' |
| - 'shardingsphere-proxy/**/src/main/**' |
| - 'shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/**' |
| - '**/*-distsql*/**/src/main/**' |
| - 'shardingsphere-kernel/shardingsphere-data-pipeline/**/src/main/**' |
| - 'shardingsphere-features/**/src/main/**/scaling/**' |
| - '**/src/main/**/data/pipeline/**' |
| - '**/src/main/resources/META-INF/services/*.data.pipeline.*' |
| - '!shardingsphere-test/**' |
| - 'shardingsphere-test/shardingsphere-integration-test/**' |
| - '!shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/**' |
| - '!*.md' |
| schedule: |
| - cron: '0 22 */1 * *' # once a day. UTC time |
| |
| concurrency: |
| group: it-scaling-${{ 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 -Drat.skip=true -Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true -Dfailsafe.skipAfterFailureCount=1 |
| |
| jobs: |
| scaling-it-test: |
| if: (github.event_name != 'schedule') |
| name: scaling-it-test |
| runs-on: ubuntu-latest |
| env: |
| postgresql_version: postgres:12-alpine |
| mysql_version: mysql:5.7 |
| opengauss_version: enmotech/opengauss:2.1.0 |
| timeout-minutes: 30 |
| steps: |
| - uses: actions/checkout@v3 |
| - name: Cache Maven Repos |
| uses: actions/cache@v3 |
| with: |
| path: ~/.m2/repository |
| key: shardingsphere-it-cache-${{ github.sha }} |
| - name: Set up JDK 8 |
| uses: actions/setup-java@v3 |
| with: |
| distribution: 'temurin' |
| java-version: 8 |
| - name: Build Scaling IT image |
| run: ./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling -Pit.env.docker -DskipTests |
| - name: Run Scaling Integration Test |
| run: ./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/pom.xml -Dit.cluster.env.type=DOCKER -Dit.env.mysql.version=${{ env.mysql_version }} -Dit.env.postgresql.version=${{ env.postgresql_version }} |
| |
| scaling-daily-it-test: |
| if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere') |
| name: scaling-daily-it-test |
| runs-on: ubuntu-latest |
| env: |
| postgresql_version: postgres:10-alpine,postgres:11-alpine,postgres:12-alpine,postgres:13-alpine,postgres:14-alpine |
| mysql_version: mysql:5.7,mysql:8.0 |
| opengauss_version: enmotech/opengauss:2.1.0,enmotech/opengauss:3.0.0 |
| timeout-minutes: 60 |
| steps: |
| - uses: actions/checkout@v3 |
| - name: Cache Maven Repos |
| uses: actions/cache@v3 |
| with: |
| path: ~/.m2/repository |
| key: shardingsphere-it-cache-${{ github.sha }} |
| - name: Set up JDK 8 |
| uses: actions/setup-java@v3 |
| with: |
| distribution: 'temurin' |
| java-version: 8 |
| - name: Build Scaling IT image |
| run: ./mvnw -B clean install -am -pl shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling -Pit.env.docker -DskipTests |
| - name: Run Scaling Daily Integration Test |
| run: ./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-scaling/pom.xml -Dit.cluster.env.type=DOCKER -Dit.env.postgresql.version=${{ env.postgresql_version }} -Dit.env.mysql.version=${{ env.mysql_version }} |