adding tests #1932
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: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GOCACHE: /home/runner/work/omg/.cache/go-build | |
GOMODCACHE: /home/runner/go/pkg/mod | |
name: Go build and test | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache-dependency-path: go.sum | |
- name: sudo go version | |
run: sudo go version | |
- name: sudo GOCACHE=$GOCACHE GOMODCACHE=$GOMODCACHE go env | |
run: sudo GOCACHE=$GOCACHE GOMODCACHE=$GOMODCACHE go env | |
- name: Build root | |
run: sudo GOCACHE=$GOCACHE GOMODCACHE=$GOMODCACHE go build -v . | |
- name: Test root | |
run: sudo GOCACHE=$GOCACHE GOMODCACHE=$GOMODCACHE go test -p 1 -timeout 60s ./... | |
- name: Test root race | |
run: sudo GOCACHE=$GOCACHE GOMODCACHE=$GOMODCACHE go test -p 1 -timeout 240s --race ./... |