From 36eac7e7bf58e9601788493cb36ef7dbf4b53822 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Wed, 14 Aug 2024 11:17:11 +0600 Subject: [PATCH] ci: add mod tidy step (#208) * ci: add mod tidy step Signed-off-by: Nikita Pivkin * run mod tidy Signed-off-by: Nikita Pivkin --------- Signed-off-by: Nikita Pivkin --- .github/workflows/test-go.yml | 10 ++++++++++ go.mod | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-go.yml b/.github/workflows/test-go.yml index 48436cd..9675820 100644 --- a/.github/workflows/test-go.yml +++ b/.github/workflows/test-go.yml @@ -23,12 +23,22 @@ jobs: go-version-file: go.mod cache: true cache-dependency-path: go.sum + - uses: actions/setup-go@v5 if: matrix.os == 'windows-latest' with: go-version-file: go.mod cache: false + - name: go mod tidy + if: matrix.os == 'ubuntu-latest' + run: | + go mod tidy + if [ -n "$(git status --porcelain)" ]; then + echo "Run 'go mod tidy' and push it" + exit 1 + fi + - name: Run non-localstack tests if: matrix.os != 'ubuntu-latest' run: make test-no-localstack diff --git a/go.mod b/go.mod index d6ee7e5..4c507f1 100644 --- a/go.mod +++ b/go.mod @@ -53,6 +53,7 @@ require ( github.com/liamg/memoryfs v1.6.0 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.8.0 + github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.31.0 github.com/testcontainers/testcontainers-go/modules/localstack v0.31.0 @@ -289,7 +290,6 @@ require ( github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.18.2 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tchap/go-patricia/v2 v2.3.1 // indirect