-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fded1c
commit 9b56e3f
Showing
2 changed files
with
36 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
on: [push, pull_request] | ||
name: test | ||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
go-version: [1.19.x, 1.20.x] | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Run lints | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
if: "matrix.platform == 'ubuntu-latest'" # gofmt linter fails on Windows for CRLF problems | ||
- name: Run tests | ||
run: go test -v ./... -covermode=count -coverprofile=coverage.out -coverpkg=./... | ||
- name: Send coverage | ||
if: "matrix.platform == 'ubuntu-latest'" | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
GO111MODULE=off go get github.com/mattn/goveralls | ||
$(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github |
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