Refactor and much better test coverage #794
Workflow file for this run
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: Go | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [macos-latest, ubuntu-latest, windows-latest] | |
go-version: ["1.16", "1.22"] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Go dependencies | |
run: go mod download | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
coverage: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- run: go test -v -coverprofile=profile.cov ./... | |
- uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: profile.cov |