-
Notifications
You must be signed in to change notification settings - Fork 37
61 lines (58 loc) · 1.74 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- uses: open-policy-agent/setup-opa@v2
with:
version: latest
- run: go install git.sr.ht/~charles/rq/cmd/rq@latest
- run: build/do.rq pull_request
- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- uses: open-policy-agent/setup-opa@v2
with:
version: latest
# rq doesn't work well on windows currently, or at least
# so it seemed, so until we've resolved that together with
# the rq maintainers, we'll just run the build steps directly
# on windows-latest
- run: go build
- run: go test ./...
- run: go test -tags e2e ./e2e
- run: opa check --strict --capabilities build/capabilities.json bundle
- run: ./regal lint --format github bundle
- run: ./regal table --compare-to-readme bundle
# lint-bundle is here to dogfood the setup-regal action
# from https://github.com/StyraInc/setup-regal
lint-bundle:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Regal
uses: StyraInc/setup-regal@main
with:
version: latest
- run: regal lint --format github bundle/regal