-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.42 KB
/
go.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
name: Go CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
name: Build Go scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
# Use go.mod file to setup go version used.
with:
go-version-file: ./go.mod
- name: Check version
run: go version
- name: Build all Go packages
# -v prints the names of the packages as they are getting compiled.
run: go build -v ./...
# Read the documentation under cmd/vet for more in detail information
# about the heuristics and checks used by the go vet tool to find problems in
# a codebase.
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
# Use go.mod file to setup go version used.
with:
go-version-file: ./go.mod
- name: Check version
run: go version
- name: Vet all packages
run: go vet ./...
# Test have not yet been created for this script.
# test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up Go
# uses: actions/setup-go@v3
# # Use go.mod file to setup go version used.
# with:
# go-version-file: ./go.mod
# - name: Check version
# run: go version
# - name: Run all tests
# run: go test -v ./...