-
Notifications
You must be signed in to change notification settings - Fork 20
79 lines (68 loc) · 2.57 KB
/
workflow.yml
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
name: actions
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
golangci-lint:
name: runner / golangci-lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_flags: "--enable-all --timeout=10m --exclude-use-default=false --tests=false --disable=gochecknoinits,gochecknoglobals,exhaustive,nakedret,exhaustivestruct,funlen,godot,golint,lll,varnamelen,revive,stylecheck,ireturn,stylecheck,nosnakecase,interfacebloat,nonamedreturns,wsl,cyclop,exhaustruct,forcetypeassert,wrapcheck"
workdir: proxywasm
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
cache: true
- name: Build
run: go build ./...
- name: Build (wasmer)
run: go build -tags='wasmer' ./...
test:
runs-on: ubuntu-latest
# A matrix proves the supported range of Go versions work. This must always
# include the floor Go version policy of Mosn and the current Go version.
# Mosn's floor Go version for libraries is two behind current, e.g. if Go
# supports 1.19 and 1.20, Mosn libraries must work on 1.18, 1.19 and 1.20.
#
# A floor version is required to ensure Mosn can receive security patches.
# Without one, dependencies become locked to an old version of Go, which
# itself receives no security patch updates.
#
# Mosn's binary is built with Go's floor version, e.g. if Go supports 1.19
# and 1.20, Mosn will build any downloadable executables with 1.19.
#
# Even if mosn works with a Go version below its supported floor, users
# must not depend on this. Mosn and its library dependencies are free to
# use features in the supported floor Go version at any time. This remains
# true even if mosn library dependencies are not eagerly updated.
strategy:
matrix:
go-version:
- "1.20" # Current Go version
- "1.19"
- "1.18" # Floor Go version of Mosn == current - 2
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Test
run: go test -v ./...
- name: Test (wasmer)
run: go test -tags='wasmer' -v ./...