-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 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
name: Go
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Unit Test
run: make test
- name: Lint
run: |
export GO111MODULE=on; go get || go get -t ./...
go get golang.org/x/lint/golint
go get github.com/gordonklaus/ineffassign
diff <(echo -n) <(gofmt -s -d .) # Lint Check - Code Formatting
go vet ./...
~/go/bin/golint ./... || true
~/go/bin/ineffassign . # Lint Check - Unused Assignment
make test
- name: Build
run: go build -v ./cmd/gophrase.go
- name: Run
run: |
make run
rm -f ./gophrase && make build && ./gophrase
- name: Install
run: make install || true
- name: Build Cross Platform Binaries
run: |
make build_binaries
find binaries -type f | xargs ls -ltrh
cat binaries/sha256sum.txt
./$(find binaries -name "*.linux.amd64")
./$(find binaries -name "*.linux.amd64") -n 6
./$(find binaries -name "*.linux.amd64") --help || true