From b261d4a70d69f82b4b9ee0cf8e5ef4d39c64ffb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Antunes?= Date: Mon, 28 Jul 2025 16:24:15 +0100 Subject: [PATCH] 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 --- .github/workflows/build-test-deploy.yaml | 10 ++++++++++ Makefile | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/build-test-deploy.yaml b/.github/workflows/build-test-deploy.yaml index a7c7b8bf..6d5af2ee 100644 --- a/.github/workflows/build-test-deploy.yaml +++ b/.github/workflows/build-test-deploy.yaml @@ -27,6 +27,15 @@ jobs: - name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass. run: exit 1 + tidy-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + - run: make tidy-diff + test-integration: runs-on: ubuntu-latest steps: @@ -241,6 +250,7 @@ jobs: validate-pr-tests: runs-on: ubuntu-latest needs: + - tidy-check - test-integration - run-examples - compile-collect diff --git a/Makefile b/Makefile index 8b607047..c3a99ee3 100644 --- a/Makefile +++ b/Makefile @@ -103,6 +103,11 @@ clean: tidy: go mod tidy +# Prints the diff of the changes that would be made by `go mod tidy`. Used in CI +.PHONY: tidy-diff +tidy-diff: + go mod tidy -diff + # Only build when any of the files in SOURCES changes, or if bin/ is absent MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) SOURCES := $(shell find $(MAKEFILE_DIR) -type f \( -name "*.go" -o -name "go.mod" -o -name "go.sum" \))