Skip to content

Commit b261d4a

Browse files
authored
chore(ci): make sure our CI builds the prod binaries (#1813)
* chore(ci): make sure our CI builds the prod binaries * chore(ci): turns out its all about go mod tidy * chore(ci): turns out its all about go mod tidy
1 parent 9ec487a commit b261d4a

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/build-test-deploy.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ jobs:
2727
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
2828
run: exit 1
2929

30+
tidy-check:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-go@v5
35+
with:
36+
go-version-file: 'go.mod'
37+
- run: make tidy-diff
38+
3039
test-integration:
3140
runs-on: ubuntu-latest
3241
steps:
@@ -241,6 +250,7 @@ jobs:
241250
validate-pr-tests:
242251
runs-on: ubuntu-latest
243252
needs:
253+
- tidy-check
244254
- test-integration
245255
- run-examples
246256
- compile-collect

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ clean:
103103
tidy:
104104
go mod tidy
105105

106+
# Prints the diff of the changes that would be made by `go mod tidy`. Used in CI
107+
.PHONY: tidy-diff
108+
tidy-diff:
109+
go mod tidy -diff
110+
106111
# Only build when any of the files in SOURCES changes, or if bin/<file> is absent
107112
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
108113
SOURCES := $(shell find $(MAKEFILE_DIR) -type f \( -name "*.go" -o -name "go.mod" -o -name "go.sum" \))

0 commit comments

Comments
 (0)