-
-
Notifications
You must be signed in to change notification settings - Fork 72
40 lines (37 loc) · 1015 Bytes
/
build.yaml
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
name: build
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: 1.21.x
cache-dependency-path: |
**/go.sum
**/go.mod
- name: Setup CUE
uses: cue-lang/setup-cue@1713281ae501e533ff06108005dffeab9e2e5203 # main
with:
version: v0.6.0
- name: Run tests
run: make test
- name: Run linter
run: make lint-samples
- name: Run setup action
uses: ./actions/setup
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
echo 'run "make test lint-samples" and commit changes'
exit 1
fi