forked from mitchellh/gox
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (61 loc) · 1.47 KB
/
test.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
name: build
on:
push: {}
env:
GOPATH: /home/runner/work/go
jobs:
test-after-go-11:
runs-on: ubuntu-latest
strategy:
matrix:
go: [
"1.11.13",
"1.12.17",
"1.13.15",
"1.14.15",
"1.15.15",
"1.16.15",
"1.17.7",
"1.18.3",
]
fail-fast: true
name: Go ${{ matrix.go }} test
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Build
run: go build .
- name: Test
run: go test -v ./...
test-before-go-11:
runs-on: ubuntu-latest
strategy:
matrix:
go: [
"1.6.4",
"1.7.6",
"1.8.7",
"1.9.7",
"1.10.8",
]
fail-fast: true
name: Go ${{ matrix.go }} test
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Setup GOPATH
run: mkdir -p $GOPATH/src/github.com/$GITHUB_REPOSITORY
- name: Copy
run: cp -r ./ $GOPATH/src/github.com/$GITHUB_REPOSITORY
- name: Get
run: cd $GOPATH/src/github.com/$GITHUB_REPOSITORY && go get .
- name: Build
run: cd $GOPATH/src/github.com/$GITHUB_REPOSITORY && go build .
- name: Test
run: cd $GOPATH/src/github.com/$GITHUB_REPOSITORY && go test -v ./...