Rename branch to main and filter build to reflect badge #48
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: test | |
on: [push] | |
jobs: | |
build: | |
name: Test and Build | |
runs-on: macos-latest | |
steps: | |
- name: Set up Go 1.16 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16.3 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Get dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: go mod download | |
- name: Test | |
run: go test ./pkg/* | |
- name: Build | |
run: go build |