-
Notifications
You must be signed in to change notification settings - Fork 458
52 lines (38 loc) · 1.2 KB
/
pullrequest.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
name: CI Build and Test for PR
permissions:
contents: read
on:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: check format
run: make check_format
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: build and test
run: make docker_tests
precommits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: "3.9"
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: "1.21.5"
- name: run pre-commits
run: |
make precommit_install
pre-commit run -a
# If previous stage fails, print resolution steps
- if: ${{ failure() }}
name: Read for resolution steps
run: |
echo "Pre-commits failed! Run 'make precommit_install' then 'pre-commits run -a' to fix."
exit 1