forked from Graphmasters/occamy
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.47 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
66
name: go
# Controls when the workflows will run
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# The 'test' job runs all the go tests
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Test
run: go test -v -timeout 60s ./...
# The 'examples' package builds all the examples in the examples module
examples:
name: examples
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Build examples
working-directory: ./examples
run: go build -v -o ./outputs/ ./...
# The 'lint' job runs the linter. It is only done on pull requests because
# the linter may change an fail on the push after it passed on a pull request.
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45