You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/12/06 03:19:36 UTC

[shardingsphere] branch master updated: Add : add nightly build IT (#22687)

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 37edc88d97f Add : add nightly build IT (#22687)
37edc88d97f is described below

commit 37edc88d97fde124f26d4df56e751a058c1911a2
Author: 孙念君 Nianjun Sun <su...@apache.org>
AuthorDate: Tue Dec 6 11:19:30 2022 +0800

    Add : add nightly build IT (#22687)
---
 .github/workflows/nightly-it.yml | 196 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 196 insertions(+)

diff --git a/.github/workflows/nightly-it.yml b/.github/workflows/nightly-it.yml
new file mode 100644
index 00000000000..ebd9690d838
--- /dev/null
+++ b/.github/workflows/nightly-it.yml
@@ -0,0 +1,196 @@
+#
+# 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 - IT
+
+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 -Drat.skip=true
+
+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: '8'
+      - uses: actions/cache@v3
+        with:
+          path: ~/.m2/repository
+          key: shardingsphere-maven-third-party-it-cache-${{ github.sha }}
+          restore-keys: |
+            shardingsphere-maven-third-party-it-cache-
+            shardingsphere-maven-third-party-
+      - name: Maven resolve ranges
+        run: ./mvnw versions:resolve-ranges -ntp -Dincludes='org.springframework:*,org.springframework.boot:*'
+      - name: Build IT image
+        run: ./mvnw -B clean install -am -pl test/e2e/suite -Pit.env.docker -DskipTests -Dspotless.apply.skip=true
+      - name: Verify Suite CI Run
+        run: ./mvnw -B install -pl test/e2e/suite -Dspotless.apply.skip=true
+      - name: Save IT image
+        run: docker save -o /tmp/shardingsphere-proxy-test.tar apache/shardingsphere-proxy-test:latest
+      - uses: actions/upload-artifact@v3
+        with:
+          name: it-image
+          path: /tmp/shardingsphere-proxy-test.tar
+          retention-days: 1
+
+  it-empty-rule:
+    name: empty rule
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    needs: build-it-image
+    strategy:
+      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: shardingsphere-maven-third-party-it-cache-${{ github.sha }}
+      - uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: 8
+      - 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/shardingsphere-proxy-test.tar
+      - name: Run Integration Test
+        run: ./mvnw -nsu -B install -f test/e2e/suite/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: 10
+    strategy:
+      matrix:
+        adapter: [ proxy, jdbc ]
+        mode: [ standalone, Cluster ]
+        database: [ MySQL, PostgreSQL, openGauss ]
+        scenario: [ db, tbl, encrypt, readwrite_splitting, shadow, encrypt_with_data_type ]
+        exclude:
+          - adapter: jdbc
+            mode: Cluster
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/cache@v3
+        with:
+          path: ~/.m2/repository
+          key: shardingsphere-maven-third-party-it-cache-${{ github.sha }}
+      - uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: 8
+      - 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/shardingsphere-proxy-test.tar
+      - name: Run Integration Test
+        run: ./mvnw -nsu -B install -f test/e2e/suite/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: 10
+    strategy:
+      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: shardingsphere-maven-third-party-it-cache-${{ github.sha }}
+      - uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: 8
+      - 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/shardingsphere-proxy-test.tar
+      - name: Run Integration Test
+        run: ./mvnw -nsu -B install -f test/e2e/suite/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 }}
+
+  mysql-proxy-agent:
+    name: Agent Metrics & OpenTelemetry
+    if: (github.event_name == 'schedule' && github.repository == 'apache/shardingsphere')
+    needs: it-mixture-rule
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: '8'
+      - uses: actions/cache@v3
+        with:
+          path: ~/.m2/repository
+          key: shardingsphere-maven-third-party-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            shardingsphere-maven-third-party-
+      - name: Maven resolve ranges
+        run: ./mvnw versions:resolve-ranges -ntp -Dincludes='org.springframework:*,org.springframework.boot:*'
+      - name: Build Project
+        run: ./mvnw -B clean install -DskipITs -DskipTests
+      - name: Run Integration Test
+        run: |
+          ./mvnw -B clean install -f test/e2e/agent/plugins/metrics/pom.xml -Dspotless.apply.skip=true -Pit.env.metrics
+          ./mvnw -B clean install -f test/e2e/agent/plugins/opentelemetry/pom.xml -Dspotless.apply.skip=true -Pit.env.opentelemetry