| # |
| # 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: 'Run Infra E2E Test' |
| description: 'Common steps when running an E2E Test' |
| inputs: |
| config-file: |
| description: 'The e2e test config file path' |
| required: true |
| runs: |
| using: "composite" |
| steps: |
| - name: Set Skip Env Var |
| uses: ./.github/actions/skip |
| - if: env.SKIP_CI != 'true' |
| name: Cache local Maven repository |
| uses: actions/cache@v2 |
| with: |
| path: ~/.m2/repository |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| restore-keys: | |
| ${{ runner.os }}-maven- |
| - if: env.SKIP_CI != 'true' |
| name: Check License |
| uses: apache/skywalking-eyes@a63f4afcc287dfb3727ecc45a4afc55a5e69c15f |
| - if: env.SKIP_CI != 'true' |
| name: Build Docker Image |
| shell: bash |
| env: |
| SKIP_TEST: "true" |
| run: | |
| echo "::group::Build Docker Image" |
| # Retry one more time due to frequent "maven connection reset" |
| make docker || make docker |
| echo "::endgroup::" |
| - if: env.SKIP_CI != 'true' |
| name: Build Java Test Services |
| shell: bash |
| run: | |
| echo "::group::build java test services" |
| # Retry one more time due to frequent "maven connection reset" |
| ./mvnw --batch-mode -f test/e2e-v2/java-test-service/pom.xml clean package |
| echo "::endgroup::" |
| - if: env.SKIP_CI != 'true' |
| name: Setup go |
| uses: actions/setup-go@v2 |
| with: |
| go-version: '1.16' |
| - if: env.SKIP_CI != 'true' |
| name: Run E2E Test |
| uses: apache/skywalking-infra-e2e@main |
| with: |
| e2e-file: $GITHUB_WORKSPACE/test/e2e-v2/cases/${{ inputs.config-file }} |
| - uses: actions/upload-artifact@v2 |
| if: ${{ failure() }} |
| name: Upload Logs |
| with: |
| name: logs |
| path: "${{ env.SW_INFRA_E2E_LOG_DIR }}" |