79 lines (63 loc) · 1.72 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
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Test
on:
push:
pull_request:
env:
GO111MODULE: on
jobs:
test:
strategy:
fail-fast: false
matrix:
platform:
- { icon: 🐧, os: ubuntu }
- { icon: 🍎, os: macOS }
go:
- 1.14.x
- 1.15.x
name: '${{ matrix.platform.icon }} ${{ matrix.go }}'
runs-on: ${{ matrix.platform.os }}-latest
steps:
- name: '⚙️ Setup go'
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: '🧰 Checkout'
uses: actions/checkout@v2
- name: '⚙️ Install deps'
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $HOME/go/bin/ latest
go install github.com/kyoh86/richgo
go install github.com/mitchellh/gox
- name: '🚧 Run tests'
run: PATH=$HOME/go/bin/:$PATH make
test-win:
name: '🟪 MINGW64'
defaults:
run:
shell: msys2 {0}
runs-on: windows-latest
steps:
- name: '⚙️ Git config'
shell: bash
run: git config --global core.autocrlf input
- name: '🟪 Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >
git
make
unzip
mingw-w64-x86_64-go
- name: '🧰 Checkout'
uses: actions/checkout@v2
- name: '⚙️ Install deps'
run: |
export GOBIN=$HOME/go/bin
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | bash -s -- -b $GOBIN latest
go install github.com/kyoh86/richgo
go install github.com/mitchellh/gox
- name: '🚧 Run tests'
run: PATH=$HOME/go/bin:$PATH make