-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 950 Bytes
/
build.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
name: Build CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: aws-actions/setup-sam@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.17
- name: Build
run: sam build -u
- name: Unit tests
run: make test
- name: "Check: go fmt"
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
gofmt -s -l -d .
echo "Please run: go fmt ./..."
exit 1
fi
if [ "$(go mod tidy -v | wc -l)" -gt 0 ]; then
go mod tidy -v
echo "Please run: go mod tidy"
exit 1
fi
- name: Generate SBOM (Main Package)
uses: CycloneDX/gh-gomod-generate-sbom@v1
with:
version: v1
args: mod -licenses -json -output ./pkg/squyre/sbom.json ./pkg/squyre/