forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.25 KB
/
pr-go-mod-tidy-mocks.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
43
44
45
46
47
48
49
50
51
52
name: "Checks dependencies and mocks generation"
on:
merge_group:
pull_request:
push:
branches:
- main
concurrency:
group: ci-${{ github.ref }}-pr-go-mod-tidy-mocks
cancel-in-progress: true
jobs:
go-mod-tidy:
name: Check go mod tidy
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- name: Run go mod tidy
run: ./scripts/go-mod-tidy-all.sh
- name: Check for diffs
run: |
git diff --exit-code || {
echo "Please run './scripts/go-mod-tidy-all.sh' and commit the changes";
exit 1;
}
generate-mocks:
name: Check up to date mocks
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
- name: Generate mocks
run: make mocks
- name: Check for diffs
run: |
git diff --exit-code || {
echo "Please run 'make mocks' and commit the changes";
exit 1;
}