-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (40 loc) · 1.2 KB
/
codegen.yml
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
# All code generation should be run prior to pull request. Running it again should not produce a diff.
name: "Codegen Verifier"
on:
pull_request:
push:
branches:
- 'ccip-develop'
jobs:
codegen-verifier:
runs-on: ubuntu-20.04
strategy:
matrix:
go-version: ['1.21']
defaults:
run:
working-directory: .
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Re-Generate mocks
run: |
rm -rf mocks # delete all mocks to ensure any deprecated files have been removed.
make generate
- name: Tidy
run: go mod tidy
- name: ensure no changes
run: |
set -e
git_status=$(git status --porcelain=v1)
if [ ! -z "$git_status" ]; then
git status
git diff
echo "Error: modified files detected, run 'make generate' / 'go mod tidy'."
exit 1
fi