-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve Sempahore CI build
- Loading branch information
Showing
6 changed files
with
449 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,35 @@ | ||
version: v1.0 | ||
name: Go | ||
agent: | ||
machine: | ||
type: e1-standard-2 | ||
os_image: ubuntu2004 | ||
blocks: | ||
- name: Test | ||
task: | ||
jobs: | ||
- name: go test | ||
commands: | ||
- sem-version go 1.17 | ||
- export GO111MODULE=on | ||
- export GOPATH=~/go | ||
- 'export PATH=/home/semaphore/go/bin:$PATH' | ||
- checkout | ||
- go version | ||
- go get ./... | ||
- go test ./... | ||
- go build -v . | ||
version: v1.0 | ||
name: Go | ||
agent: | ||
machine: | ||
type: e1-standard-2 | ||
os_image: ubuntu2004 | ||
blocks: | ||
- name: Style Check | ||
task: | ||
jobs: | ||
- name: fmt | ||
commands: | ||
- sem-version go 1.17 | ||
- checkout | ||
- ./scripts/golangci_install.sh -b $(go env GOPATH)/bin v1.42.1 | ||
- export PATH=$(go env GOPATH)/bin:$PATH | ||
- golangci-lint run ./... | ||
|
||
- name: Test & Build | ||
task: | ||
prologue: | ||
commands: | ||
- sem-version go 1.17 | ||
- export PATH=$(go env GOPATH)/bin:$PATH | ||
- checkout | ||
- go version | ||
|
||
jobs: | ||
- name: Test | ||
commands: | ||
- go test ./... | ||
|
||
- name: Build | ||
commands: | ||
- go build -v . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.