Update go.mod #16
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-test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout your project with git | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Install Go on the VM running the action. | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
- name: Install gocover-cobertura | |
run: | | |
go install github.com/boumenot/gocover-cobertura@latest | |
# Alternatively, install using go install | |
- name: Set up gotestfmt | |
run: | | |
go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
# Run tests with nice formatting. Save the original log in /tmp/gotest.log | |
- name: Run tests | |
run: | | |
set -euo pipefail | |
go test -json -v -coverprofile=coverage.txt -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt |