This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
92 lines (87 loc) · 3.2 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# Copyright 2022 SkyAPM org
#
# Licensed 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: Build
on:
pull_request:
push:
branches:
- master
tags:
- 'v*'
jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
case:
- { name: 'gear', plugin_dir: 'gear', go_version: '1.13' }
- { name: 'gin/v2', plugin_dir: 'gin/v2', go_version: '1.13' }
- { name: 'gin/v3', plugin_dir: 'gin/v3', go_version: '1.13' }
- { name: 'micro', plugin_dir: 'micro', go_version: '1.14' }
- { name: 'resty', plugin_dir: 'resty', go_version: '1.13' }
- { name: 'go-restful', plugin_dir: 'go-restful', go_version: '1.13' }
- { name: 'logrus', plugin_dir: 'logrus', go_version: '1.13' }
- { name: 'dubbo-go', plugin_dir: 'dubbo-go', go_version: '1.15' }
- { name: 'grom', plugin_dir: 'grom', go_version: '1.16' }
- { name: 'kafka-reporter', plugin_dir: 'kafkareporter', go_version: '1.16' }
- { name: 'kratos', plugin_dir: 'kratos', go_version: '1.16' }
- { name: 'sql', plugin_dir: 'sql', go_version: '1.16' }
- { name: 'zap', plugin_dir: 'zap', go_version: '1.13' }
- { name: 'mongo', plugin_dir: 'mongo', go_version: '1.18' }
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
plugin:
- '${{matrix.case.plugin_dir}}/**'
- name: Set up Go ${{ matrix.case.go_version }}
if: steps.filter.outputs.plugin == 'true'
uses: actions/setup-go@v2
id: go
with:
go-version: ${{ matrix.case.go_version }}
- name: Get dependencies
if: steps.filter.outputs.plugin == 'true'
run: make deps PLUGIN_DIR=${{ matrix.case.plugin_dir }}
- name: Lint
if: steps.filter.outputs.plugin == 'true'
run: make lint PLUGIN_DIR=${{ matrix.case.plugin_dir }}
- name: Test
if: steps.filter.outputs.plugin == 'true'
run: make test PLUGIN_DIR=${{ matrix.case.plugin_dir }}
build-expected:
name: Build & Test All
runs-on: ubuntu-latest
timeout-minutes: 90
needs: [ build ]
steps:
- name: Call me by your name
run: echo "Birds of a feather flock together"
license:
name: Check License
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check License Header
uses: apache/skywalking-eyes@b49aa124edcd9460d3ecc6d03f1e71efe9be9732
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}