Skip to content

api work

api work #1881

Workflow file for this run

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 ./...