-
Notifications
You must be signed in to change notification settings - Fork 9
40 lines (32 loc) · 925 Bytes
/
go.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
# SPDX-FileCopyrightText: 2023 Kavya Shukla <[email protected]>
# SPDX-License-Identifier: GPL-2.0-only
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
check-latest: true
cache: true
- name: Check Formatting
run: |
find . -name '*.go' -not -path './vendor/*' | xargs gofmt -d -s > gofmt.out
if [[ -s gofmt.out ]]; then
echo "The following files were found to have formatting deviations:"
cat gofmt.out
exit 1
fi
- name: Build
run: cp external_ref_fields.example.yaml external_ref_fields.yaml && go generate ./... && go build -v ./...
# - name: Test
# run: go test -v ./...