Skip to content

fix: properly cache go.sum files #10

fix: properly cache go.sum files

fix: properly cache go.sum files #10

Workflow file for this run

name: auth
on:
push:
branches: ['**']
pull_request:
branches: ['**']
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docker/server/auth
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
sparse-checkout: docker/server/auth
sparse-checkout-cone-mode: false
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 'stable'
check-latest: true
cache-dependency-path: |
docker/server/auth/go.sum
- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Build
run: CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-w -s'
- name: Test
run: go test --v --cover --useosfs --race ./...