-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (52 loc) · 1.41 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
name: CI
on:
pull_request:
branches:
- main
- 'v*'
jobs:
generate-build-and-check-changes:
name: Generate, build and check uncommitted changes
runs-on: ubuntu-latest
steps:
- name: Setup Buf
uses: bufbuild/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run the generate script
uses: cake-build/cake-action@v1
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
with:
cake-bootstrap: true
target: Generate
- name: Run the build script
uses: cake-build/cake-action@v1
with:
cake-bootstrap: true
target: Build
- name: Check repo status
run: |-
REPO_STATUS="$(git status --porcelain)"
if [[ ! -z $REPO_STATUS ]]; then
echo "::error::Uncommitted changes detected"
echo "$REPO_STATUS"
exit 1
fi
tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Setup Buf
uses: bufbuild/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run the test script
uses: cake-build/cake-action@v1
with:
cake-bootstrap: true
target: UnitTests