Skip to content

feat:add support goframe v2 #534

feat:add support goframe v2

feat:add support goframe v2 #534

Workflow file for this run

# 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: Plugin Tests
concurrency:
group: plugins-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
jobs:
build:
name: Build Plugin Test On ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install docker
brew install colima
colima start
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
submodules: true
- name: Build
run: make -C test/plugins build
- uses: actions/upload-artifact@v4
name: Upload Test Base
with:
name: test-tools-${{ matrix.os }}
path: |
test/plugins/dist
test:
if: always()
name: ${{ matrix.case }}
needs:
- build
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
matrix:
case:
- gin
- http
- dubbo
- go-redisv9
- go-restfulv3
- gorm
- kratosv2
- microv4
- mongo
- mysql
- zap
- logrus
- plugin_exclusion
- runtime_metrics
- mux
- grpc
- irisv12
- trace-activation
- logging-activation
- fasthttp
- discard-reporter
- fiber
- echov4
- rocketmq
- amqp
- pulsar
- segmentio-kafka
- go-elasticsearchv8
- goframe
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/download-artifact@v4
with:
name: test-tools-ubuntu-latest
path: test/plugins/dist
- name: Setup Tools
run: |
chmod +x test/plugins/dist/*
if ls test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz; then
docker load -i test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz
fi
- name: Install docker-compose
shell: bash
run: |
if ! command docker-compose 2>&1 > /dev/null; then
echo "Installing docker-compose"
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi
- name: Run Test
run: bash test/plugins/run.sh ${{ matrix.case }}
- uses: actions/upload-artifact@v4
name: Upload Agent
if: ${{ failure() }}
with:
path: test/plugins/workspace
name: test-plugins-workspace-${{ matrix.case }}-ubuntu
test-on-macos:
if: false
name: gin-macos
needs:
- build
runs-on: macos-12
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/download-artifact@v4
with:
name: test-tools-macos-12
path: test/plugins/dist
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
env:
HOMEBREW_NO_AUTO_UPDATE: "1"
HOMEBREW_NO_INSTALL_UPGRADE: "1"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
run: |
brew install docker docker-compose
brew install colima
colima start
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Setup Tools
run: |
chmod +x test/plugins/dist/*
if ls test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz; then
docker load -i test/plugins/dist/skywalking-agent-test-validator-1.0.0.tgz
fi
- name: Install docker-compose
shell: bash
run: |
if ! command docker-compose 2>&1 > /dev/null; then
echo "Installing docker-compose"
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
fi
- name: Run Test
run: bash test/plugins/run.sh short_versions_gin
- uses: actions/upload-artifact@v4
name: Upload Agent
if: ${{ failure() }}
with:
path: test/plugins/workspace
name: test-plugins-workspace-gin-macos
required:
if: always()
name: Plugin Tests
needs:
- test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Merge Requirement
run: |
if [[ ${{ needs.test.result }} != 'success' ]]; then
exit -1
fi