-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.42 KB
/
go-generate.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
name: Check Generated Files Up-to-date
on:
- pull_request
jobs:
check-go-generate-up-to-date:
strategy:
matrix:
go-version:
- 1.23
os:
- ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install Python
uses: actions/setup-python@v3
- name: Cache Python
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-cache
- name: Set up ssh agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.CICD_RSA_KEY }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install prereqs
run: |
git config --global url."[email protected]:axelarnetwork".insteadOf https://github.com/axelarnetwork
go install golang.org/x/tools/cmd/goimports
go install github.com/matryer/moq
- name: Run go generate
run: make generate
- name: Run goimports
run: make goimports
- name: Check for changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo Following files are changed...
git status
echo Changes:
git diff
exit 1;
else
exit 0;
fi