Merge pull request #194 from alrs/terraform-err #113
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
on: [push, pull_request] | |
name: Unit Testing | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: | |
- "1.15" | |
env: | |
GO111MODULE: "on" | |
steps: | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/checkout@v2 | |
- name: Setup environment | |
run: | | |
# Changing into a different directory to avoid polluting go.sum with "go get" | |
cd "$(mktemp -d)" | |
go mod init unit_tests | |
# Pin to a version that Go v1.15 supports | |
go get golang.org/x/tools/cmd/[email protected] | |
- name: Run go vet | |
run: | | |
go vet ./... | |
- name: Run unit tests | |
run: | | |
go test -v ./... | |
- name: Check for formatting | |
run: | |
./script/format |