Created
May 21, 2023 09:15
-
-
Save aikchun/18c546ad3485e9e2eedbad7c801acfc8 to your computer and use it in GitHub Desktop.
Github actions Templte CI for go
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
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
unittest: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.20.0' | |
- name: Verify dependencies | |
run: go mod verify | |
- name: Build | |
run: go build -v ./... | |
- name: Run go vet | |
run: go vet ./... | |
- name: Install golint | |
run: go install golang.org/x/lint/golint@latest | |
- name: Run golint | |
run: golint ./... | |
- name: Run tests | |
run: go test -race -vet=off ./... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment