-
Notifications
You must be signed in to change notification settings - Fork 34
60 lines (51 loc) · 1.63 KB
/
pr-test-generated-files.yaml
File metadata and controls
60 lines (51 loc) · 1.63 KB
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
name: Generated Code Test
## Only trigger tests if source is changing
on:
push:
paths:
- "**.proto"
- "**.lr"
- "**.go"
env:
PROTO_VERSION: "21.7"
permissions:
contents: read
jobs:
# Check if there is any dirty change for generated files
generated-files:
runs-on:
group: Default
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Import environment variables from file
run: cat ".github/env" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ">=${{ env.golang-version }}"
cache: false
# We do not permit sudo on self-hosted runners
- name: "Ensure GCC is installed"
run: |
if gcc --version; then
echo "Good to go";
else
echo "Install GCC on the runner.";
fi
# Note we do not use apt install -y protobuf-compiler` since it is too old
- name: Install Protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.protoc-version }}
- name: Check generated files
run: |
protoc --version
make prep
make mql/generate
SKIP_COMPILE=yes make providers/build
git diff --exit-code *.go
git diff --exit-code providers/**/*.lr.json
git diff --exit-code providers/**/*.lr.go
git diff --exit-code providers/**/*.resources.json