-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to GitHub Actions for CI (#41)
- Loading branch information
1 parent
ed783b9
commit d55d903
Showing
3 changed files
with
39 additions
and
16 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
on: push | ||
name: Test | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.13.x] | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Install staticcheck | ||
run: pwd && cd .. && go get -v -u honnef.co/go/tools/cmd/staticcheck && cd - | ||
shell: bash | ||
- name: Install golint | ||
run: pwd && cd .. && go get -v -u golang.org/x/lint/golint && cd - | ||
shell: bash | ||
- name: Update PATH | ||
# https://github.com/actions/setup-go/issues/12#issuecomment-524631719 | ||
run: echo "##[add-path]$(go env GOPATH)/bin" | ||
shell: bash | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
- name: Fmt | ||
if: matrix.platform != 'windows-latest' # :( | ||
run: "F=$(gofmt -l .) ; if [[ $F ]] ; then echo $F ; exit 1 ; fi" | ||
shell: bash | ||
- name: Vet | ||
run: go vet ./... | ||
- name: Staticcheck | ||
run: staticcheck ./... | ||
- name: Lint | ||
run: golint ./... | ||
- name: Test | ||
run: go test -race ./... |
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