-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (48 loc) · 1.29 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
name: test
on:
push:
pull_request:
jobs:
test:
strategy:
matrix:
go-version:
- 1.14.x
- 1.15.x
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: checkout
uses: actions/checkout@v2
- name: cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Check go-deps.txt existence
id: check_deps
uses: andstor/file-existence-action@v1
with:
files: "go-deps.txt"
- name: Read go-deps.txt
id: godeps
if: steps.check_deps.outputs.files_exists == 'true'
uses: juliangruber/read-file-action@v1
with:
path: ./go-deps.txt
- name: Install go-deps.txt
if: steps.check_deps.outputs.files_exists == 'true'
run: |
go get ${{ steps.godeps.outputs.content }}
- name: test
run: |
go test ./...