From 4c604516d511f9294f2d5bd801f931fdf270bfd3 Mon Sep 17 00:00:00 2001 From: daming Date: Thu, 28 Nov 2019 19:16:23 +0800 Subject: [PATCH] set up e2e action --- .github/workflows/docker-ci.yaml | 2 +- .github/workflows/e2e.yaml | 80 ++++++++++++++++++++ .github/workflows/istio-mixer-ci.yaml | 2 +- .github/workflows/plugins-test.yaml | 103 +++++++++++++------------- 4 files changed, 134 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/e2e.yaml diff --git a/.github/workflows/docker-ci.yaml b/.github/workflows/docker-ci.yaml index 5b3f6dbeac76..8339496acdb7 100644 --- a/.github/workflows/docker-ci.yaml +++ b/.github/workflows/docker-ci.yaml @@ -16,7 +16,7 @@ name: docker-ci -on: [push, pull_request] +on: [pull_request] env: SKIP_TEST: true DOCKER_DIR: ./docker diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 000000000000..70daca447daa --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -0,0 +1,80 @@ +# 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: E2E + +on: [pull_request] + +jobs: + Single: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set environment + run: export MAVEN_OPTS='-Dmaven.repo.local=~/.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g' + - name: Compile & Install Test Codes + run: | + ./mvnw checkstyle:check apache-rat:check + ./mvnw -Dcheckstyle.skip -Drat.skip -T2 -Dmaven.compile.fork -Dmaven.compiler.maxmem=3072 -DskipTests clean install + ./mvnw -f test/e2e/pom.xml -pl e2e-base clean install + - name: Single Node Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Single Node Tests(MySQL/JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-mysql + - name: Single Node Tests(JDK9) + run: export E2E_VERSION=jdk9-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Single Node Tests(JDK11) + run: export E2E_VERSION=jdk11-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Single Node Tests(JDK12) + run: export E2E_VERSION=jdk12-1.3 && bash -x test/e2e/run.sh e2e-single-service + - name: Agent Reboot Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-agent-reboot + + Cluster: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: actions/cache@v1 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set environment + run: export MAVEN_OPTS='-Dmaven.repo.local=~/.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g' + - name: Compile & Install Test Codes + run: | + ./mvnw checkstyle:check apache-rat:check + ./mvnw -Dcheckstyle.skip -Drat.skip -T2 -Dmaven.compile.fork -Dmaven.compiler.maxmem=3072 -DskipTests clean install + ./mvnw -f test/e2e/pom.xml -pl e2e-base clean install + - name: Cluster Tests (ES6/ZK/JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-cluster/test-runner + - name: TTL ES Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 && bash -x test/e2e/run.sh e2e-ttl/e2e-ttl-es + - name: TTL ES7 Tests(JDK8) + run: export E2E_VERSION=jdk8-1.3 DIST_PACKAGE=apache-skywalking-apm-bin-es7.tar.gz ES_VERSION=7.0.0 && bash -x test/e2e/run.sh e2e-ttl/e2e-ttl-es + - name: Cluster Tests (ES7/ZK/JDK8) + run: export E2E_VERSION=jdk8-1.3 DIST_PACKAGE=apache-skywalking-apm-bin-es7.tar.gz ES_VERSION=7.0.0 && bash -x test/e2e/run.sh e2e-cluster/test-runner diff --git a/.github/workflows/istio-mixer-ci.yaml b/.github/workflows/istio-mixer-ci.yaml index fe43946093e6..d5b0b75c5711 100644 --- a/.github/workflows/istio-mixer-ci.yaml +++ b/.github/workflows/istio-mixer-ci.yaml @@ -16,7 +16,7 @@ name: istio-mixer-ci -on: [push] +on: [pull_request] env: SCRIPTS_DIR: ./test/scripts LOG_DIR: /tmp/skywalking diff --git a/.github/workflows/plugins-test.yaml b/.github/workflows/plugins-test.yaml index 7e2231bdef38..238fab61b427 100644 --- a/.github/workflows/plugins-test.yaml +++ b/.github/workflows/plugins-test.yaml @@ -13,6 +13,7 @@ # 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: Agent Plugins Tests on: [pull_request] @@ -37,19 +38,19 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run spring-tx 4.x+ (10) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh spring-tx-scenario + run: bash test/plugin/run.sh spring-tx-scenario - name: Run spring 4.3.x-5.2.x (54) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh spring-4.3.x-scenario + run: bash test/plugin/run.sh spring-4.3.x-scenario - name: Run dubbo 2.5.x-2.6.x (10) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh dubbo-2.5.x-scenario + run: bash test/plugin/run.sh dubbo-2.5.x-scenario - name: Run dubbo 2.7.x (4) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh dubbo-2.7.x-scenario + run: bash test/plugin/run.sh dubbo-2.7.x-scenario - name: Run okhttp 3.0.x-3.14.x (34) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh okhttp-scenario + run: bash test/plugin/run.sh okhttp-scenario Group2: runs-on: ubuntu-18.04 @@ -70,17 +71,17 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run redisson 3.x (37) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh redisson-scenario + run: bash test/plugin/run.sh redisson-scenario - name: Run spring 3.1.x-4.0.x (25) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh spring-3.1.x-scenario + run: bash test/plugin/run.sh spring-3.1.x-scenario - name: Run spring-cloud-gateway 2.1.x (3) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh gateway-scenario + run: bash test/plugin/run.sh gateway-scenario - name: Run elasticsearch 5.x (3) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh elasticsearch-5.x-scenario + run: bash test/plugin/run.sh elasticsearch-5.x-scenario Group3: runs-on: ubuntu-18.04 @@ -101,17 +102,17 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run apm-toolkit-trace (1) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh apm-toolkit-trace-scenario + run: bash test/plugin/run.sh apm-toolkit-trace-scenario - name: Run jetty 9.x (63) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh jetty-scenario + run: bash test/plugin/run.sh jetty-scenario - name: Run netty-socketio 1.x (4) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh netty-socketio-scenario + run: bash test/plugin/run.sh netty-socketio-scenario - name: Run rabbitmq-scenario (12) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh rabbitmq-scenario + run: bash test/plugin/run.sh rabbitmq-scenario Group4: runs-on: ubuntu-18.04 @@ -132,17 +133,17 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run feign 9.0.0-9.5.1 (8) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh feign-scenario + run: bash test/plugin/run.sh feign-scenario - name: Run customize (1) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh customize-scenario + run: bash test/plugin/run.sh customize-scenario - name: Run postgresql 9.4.1207+ (62) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh postgresql-above9.4.1207-scenario + run: bash test/plugin/run.sh postgresql-above9.4.1207-scenario - name: Run canal 1.0.24-1.1.2 (5) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh canal-scenario + run: bash test/plugin/run.sh canal-scenario Group5: runs-on: ubuntu-18.04 @@ -163,17 +164,17 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run hystrix 1.4.20-1.5.12 (20) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh hystrix-scenario + run: bash test/plugin/run.sh hystrix-scenario - name: Run postgresql 9.2.x-9.4.x (36) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh postgresql-scenario + run: bash test/plugin/run.sh postgresql-scenario - name: Run sofarpc 5.4.0-5.6.2 (23) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh sofarpc-scenario + run: bash test/plugin/run.sh sofarpc-scenario - name: Run spring 3.0.x (8) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh spring-3.0.x-scenario + run: bash test/plugin/run.sh spring-3.0.x-scenario Group6: runs-on: ubuntu-18.04 @@ -194,15 +195,15 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run spring async 4.3.x-5.1.x (35) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh spring-async-scenario + run: bash test/plugin/run.sh spring-async-scenario - name: Run mongodb 3.4.0-3.11.1 (17) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh mongodb-3.x-scenario + run: bash test/plugin/run.sh mongodb-3.x-scenario - name: Run grpc 1.6.0-1.25.0 (22) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh grpc-scenario + run: bash test/plugin/run.sh grpc-scenario Group7: runs-on: ubuntu-18.04 @@ -223,19 +224,19 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run elasticsearch-6.x-scenario 6.7.1-6.8.4 (7) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh elasticsearch-6.x-scenario + run: bash test/plugin/run.sh elasticsearch-6.x-scenario - name: Run kafka 0.11.0.0-2.3.0 (16) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh kafka-scenario + run: bash test/plugin/run.sh kafka-scenario - name: Run ehcache 2.8.x-2.10.x (19) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh ehcache-2.x-scenario + run: bash test/plugin/run.sh ehcache-2.x-scenario - name: Run undertow 1.3.0-2.0.27 (23) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh undertow-scenario + run: bash test/plugin/run.sh undertow-scenario - name: Run jedis 2.4.0-2.9.0 (18) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh jedis-scenario + run: bash test/plugin/run.sh jedis-scenario Group8: runs-on: ubuntu-18.04 @@ -256,18 +257,18 @@ jobs: with: java-version: 8 - name: Build SkyWalking Agent - run: bash tools/ci/agent-build-condition.sh || ./mvnw clean package -DskipTests -Pagent >/dev/null + run: ./mvnw clean package -DskipTests -Pagent >/dev/null - name: Build the Docker image - run: bash tools/ci/agent-build-condition.sh || ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null + run: ./mvnw -f test/plugin/pom.xml clean package -DskipTests docker:build -DBUILD_NO=local >/dev/null - name: Run elasticsearch-7.x-scenario 7.0.0-7.4.2 (11) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh elasticsearch-7.x-scenario + run: bash test/plugin/run.sh elasticsearch-7.x-scenario - name: Run spring-webflux 2.x (18) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh webflux-scenario + run: bash test/plugin/run.sh webflux-scenario - name: Run spring 4.1.x-4.2.x (20) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh spring-4.1.x-scenario + run: bash test/plugin/run.sh spring-4.1.x-scenario - name: Run solrj 7.x (12) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh solrj-7.x-scenario + run: bash test/plugin/run.sh solrj-7.x-scenario - name: Run httpclient 4.3.x-4.5.x (14) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh httpclient-4.3.x-scenario + run: bash test/plugin/run.sh httpclient-4.3.x-scenario - name: Run httpasyncclient 4.0-4.1.3 (7) - run: bash tools/ci/agent-build-condition.sh || bash test/plugin/run.sh httpasyncclient-scenario \ No newline at end of file + run: bash test/plugin/run.sh httpasyncclient-scenario \ No newline at end of file