Merge pull request #38 from arajendiran/patch-1 #9
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: Build and run all tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.20.x] | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Cache go modules | |
uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} | |
restore-keys: ${{ runner.os }}-go-${{ hashFiles('go.sum') }} | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Get and verify dependencies | |
run: go mod download && go mod verify | |
- name: Go vet | |
run: go vet . | |
- name: Go test | |
run: go test . |