-
Notifications
You must be signed in to change notification settings - Fork 307
79 lines (64 loc) · 1.81 KB
/
pr.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: pr
on: [pull_request]
permissions:
actions: read
checks: none
contents: none
deployments: none
issues: none
packages: none
pull-requests: none
repository-projects: none
security-events: none
statuses: none
jobs:
style:
runs-on: ubuntu-latest
steps:
- name: checkout all PR branch and commits
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ github.event.pull_request.commits }}
- name: validate conventional commit prefix
working-directory: scripts
run: ./validate-conventional-commit-prefix.sh
validate:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v4
- name: setup go
uses: actions/setup-go@v5
with:
go-version: "1.22.x"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
args: --timeout=5m --color=always --max-same-issues=0 --max-issues-per-linter=0
- name: build
run: make build
- name: unit test
run: make test
- name: setup bats
uses: bats-core/[email protected]
with:
# Pin bats version to fix CI issue: https://github.com/bats-core/bats-action/pull/4
bats-version: "1.10.0"
support-install: false
assert-install: false
detik-install: false
file-install: false
- name: test examples
run: make test-examples
- name: setup regal
uses: StyraInc/setup-regal@v1
with:
version: v0.11.0
- name: lint examples
run: regal lint --format github examples
- name: acceptance
run: make test-acceptance
- name: test oci push/pull
run: ./scripts/push-pull-e2e.sh