Merge pull request #147 from zhengguo07q/main #253
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: build | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.18 | |
- name: Setup golangci-lint | |
uses: golangci/golangci-lint-action@v2.5.2 | |
- name: Run linter | |
run: make lint | |
- name: Run test coverage | |
run: go test $(go list ./... | grep -v example) -coverprofile=coverage.txt -covermode=atomic | |
- name: Upload coverage to Codecov | |
run: bash <(curl -s https://codecov.io/bash) |