68 lines
2.7 KiB
YAML
68 lines
2.7 KiB
YAML
#
|
|
# 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 Plugin Test"
|
|
description: "Common steps when running a plugin test"
|
|
inputs:
|
|
test_case:
|
|
description: "The plugin test name"
|
|
required: true
|
|
java_version:
|
|
description: "The Java version under which this test case will run"
|
|
required: false
|
|
default: "jdk8"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Cache local Maven repository
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-agent-test
|
|
restore-keys: ${{ runner.os }}-maven-agent-test
|
|
- name: Check License
|
|
uses: apache/skywalking-eyes@a63f4afcc287dfb3727ecc45a4afc55a5e69c15f
|
|
- name: Add checkstyle-plugin
|
|
shell: bash
|
|
run: |
|
|
echo "::group::Add checkstyle plugin to the pom.xml"
|
|
sed -i "/<\/sourceDirectories>/i <sourceDirectory>scenarios\/""${{ inputs.test_case }}""<\/sourceDirectory>" test/plugin/pom.xml
|
|
echo "::endgroup::"
|
|
- name: Build SkyWalking Agent
|
|
shell: bash
|
|
run: |
|
|
echo "::group::Build SkyWalking Agent"
|
|
# Retry one more time due to frequent "maven connection reset"
|
|
./mvnw --batch-mode clean package -DskipTests || \
|
|
./mvnw --batch-mode clean package -DskipTests
|
|
echo "::endgroup::"
|
|
- name: Build Docker Image
|
|
shell: bash
|
|
run: |
|
|
echo "::group::Build Docker Image"
|
|
# Retry one more time due to frequent "maven connection reset"
|
|
./mvnw --batch-mode -f test/plugin/pom.xml clean package -DskipTests -P${{ inputs.java_version }} || \
|
|
./mvnw --batch-mode -f test/plugin/pom.xml clean package -DskipTests -P${{ inputs.java_version }}
|
|
echo "::endgroup::"
|
|
- name: Run Plugin Test ${{ inputs.test_case }}
|
|
shell: bash
|
|
run: |
|
|
echo "::group::Run Plugin Test ${{ inputs.test_case }}"
|
|
bash test/plugin/run.sh --image_version=${{ inputs.java_version }}-1.0.0 ${{ inputs.test_case }}
|
|
echo "::endgroup::"
|