-
Notifications
You must be signed in to change notification settings - Fork 5
80 lines (77 loc) · 2.02 KB
/
actions.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
80
name: warpforge
on:
push:
branches:
- 'master'
- 'main'
pull_request:
env:
GO_VERSION: '1.18'
jobs:
serum:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Clone Serum Analyzer
uses: actions/checkout@v3
with:
repository: serum-errors/go-serum-analyzer
ref: master
path: go-serum-analyzer
- name: Install Serum Analyzer
working-directory: go-serum-analyzer
run: go install ./cmd/go-serum-analyzer/
- name: Run Serum Analyzer
run: go-serum-analyzer ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Clone warplark
uses: actions/checkout@v3
with:
repository: warptools/warplark
ref: main
path: warplark
- name: Install warplark
working-directory: warplark
run: go install ./...
- name: Run Tests
run: go test ./...
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- run: mkdir /tmp/bundle
- run: cp plugins/* /tmp/bundle
- name: Build warpforge binary
run: go build -o /tmp/bundle/warpforge cmd/warpforge/*.go
- name: Create release tarball
run: tar -C /tmp/bundle/ -czvf warpforge.tgz .
- name: Archive release tarball
uses: actions/upload-artifact@v3
with:
name: warpforge.tgz
path: warpforge.tgz
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- run: go install golang.org/x/tools/go/analysis/passes/nilness/cmd/[email protected]
- run: go vet -vettool=$(which nilness) ./...