forked from andychase/gbajs2
-
Notifications
You must be signed in to change notification settings - Fork 34
48 lines (40 loc) · 1.15 KB
/
auth.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: auth
on:
push:
branches: ['**']
jobs:
pre_job:
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
concurrent_skipping: 'same_content_newer'
build:
needs: pre_job
if: github.ref == 'refs/heads/master' || needs.pre_job.outputs.should_skip != 'true'
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 ./...