-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (34 loc) · 1.06 KB
/
build.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
name: Build
on: [push]
jobs:
linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16.4'
- run: sudo apt-get install -y git
- run: go version
- run: go env
- run: go get ./...
- run: go generate ./...
- name: go test
run: cd tests && go test pkg_test.go cmd_root_test.go cmd_init_test.go cmd_render_test.go cmd_version_test.go
- name: go build
run: mkdir bin && go build -o bin/clencli
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16.4'
- run: go version
- run: go env
- run: go get ./...
- run: go generate ./...
- name: go test
run: cd tests && go test pkg_test.go cmd_root_test.go cmd_init_test.go cmd_render_test.go cmd_version_test.go
- name: go build
run: New-Item -Path "." -Name "bin" -ItemType "directory" && go build -o bin/clencli