Merge pull request #85 #120
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: Quality Check | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: Test and coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.20 | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
- name: go test | |
run: go test -v -covermode=count -coverprofile=coverage.out ./... | |
- name: Convert coverage.out to coverage.lcov | |
uses: jandelgado/[email protected] | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: coverage.lcov | |
vet: | |
name: go vet and lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.20 | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
go install golang.org/x/lint/golint@latest | |
- name: go vet | |
run: go vet ./... | |
- name: go lint | |
run: golint -set_exit_status ./... | |
golangci: | |
name: golangci lint check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.52.0 |