diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5f804d5cd..fdc916751 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -4,6 +4,8 @@ on: branches: - master - main +env: + GoVersion: '1.23' jobs: static: @@ -11,7 +13,8 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.23' + go-version: ${{ env.GoVersion }} + cache: false - uses: actions/checkout@v4 - name: Run static checks @@ -22,7 +25,8 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.23' + go-version: ${{ env.GoVersion }} + cache: false - uses: actions/checkout@v4 - run: make build @@ -32,7 +36,8 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.23' + go-version: ${{ env.GoVersion }} + cache: false - uses: actions/checkout@v4 - run: make fmt @@ -48,7 +53,9 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: '1.23' + go-version: ${{ env.GoVersion }} + cache: false + - uses: actions/checkout@v4 - name: Install Terraform @@ -64,11 +71,13 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.23' + go-version: ${{ env.GoVersion }} + cache: false + - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: '~> v2' args: check goreleaser-test-release: @@ -79,12 +88,13 @@ jobs: fetch-depth: 0 # goreleaser needs the whole history to build the release notes - uses: actions/setup-go@v5 with: - go-version: '1.23' + go-version: ${{ env.GoVersion }} + cache: false - uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: '~> v2' args: release --snapshot --clean - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index d3e4b0ca5..b805bd84f 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -20,6 +20,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: '1.23' + cache: false - name: Checkout uses: actions/checkout@v4 @@ -47,7 +48,7 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: '~> v2' args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/cli/cli_app.go b/cli/cli_app.go index b2ddb8e3a..a6f6d6df0 100644 --- a/cli/cli_app.go +++ b/cli/cli_app.go @@ -149,7 +149,7 @@ AUTHOR(S): ` // This uses the constraint syntax from https://github.com/hashicorp/go-version -const defaultTerraformVersionConstraint = ">= v1.9.0" +const defaultTerraformVersionConstraint = ">= v1.7.0" var terragruntVersion string var terragruntRunID string diff --git a/configstack/stack_test.go b/configstack/stack_test.go index 6dbeb17c8..6294ed1bd 100644 --- a/configstack/stack_test.go +++ b/configstack/stack_test.go @@ -16,11 +16,11 @@ func TestFindStackInSubfolders(t *testing.T) { t.Parallel() filePaths := []string{ - "stage/data-stores/redis/" + config.DefaultConfigName, - "stage/data-stores/postgres/" + config.DefaultConfigName, - "stage/ecs-cluster/" + config.DefaultConfigName, - "stage/kms-master-key/" + config.DefaultConfigName, - "stage/vpc/" + config.DefaultConfigName, + "/stage/data-stores/redis/" + config.DefaultConfigName, + "/stage/data-stores/postgres/" + config.DefaultConfigName, + "/stage/ecs-cluster/" + config.DefaultConfigName, + "/stage/kms-master-key/" + config.DefaultConfigName, + "/stage/vpc/" + config.DefaultConfigName, } tempFolder := createTempFolder() @@ -37,10 +37,10 @@ func TestFindStackInSubfolders(t *testing.T) { var modulePaths []string + tempFolder = strings.TrimSuffix(tempFolder, "/") for _, module := range stack.Modules { relPath := strings.Replace(module.Path, tempFolder, "", 1) relPath = filepath.ToSlash(util.JoinPath(relPath, config.DefaultConfigName)) - modulePaths = append(modulePaths, relPath) } diff --git a/test/integration_test.go b/test/integration_test.go index 2ec5665a8..c9385d11d 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -196,16 +196,16 @@ func TestTerragruntCustomConfig(t *testing.T) { - path: fixture-custom-config/sub-project-1 - path: fixture-custom-config/sub-project-2/sub-project-2-1 dependencies: - - fixture-custom-config/sub-project-1 + - fixture-custom-config/sub-project-1 - path: fixture-custom-config/sub-project-2/sub-project-2-2 dependencies: - - fixture-custom-config/sub-project-2/sub-project-2-1 - - fixture-custom-config/sub-project-1 + - fixture-custom-config/sub-project-2/sub-project-2-1 + - fixture-custom-config/sub-project-1 - path: fixture-custom-config/sub-project-3 dependencies: - - fixture-custom-config/sub-project-2/sub-project-2-1 - - fixture-custom-config/sub-project-2/sub-project-2-2 - - fixture-custom-config/sub-project-1 + - fixture-custom-config/sub-project-2/sub-project-2-1 + - fixture-custom-config/sub-project-2/sub-project-2-2 + - fixture-custom-config/sub-project-1 `)+"\n", out.String()) assert.Equal(t, "", err.String()) } @@ -301,11 +301,11 @@ func TestDownloads(t *testing.T) { }, { path: "fixture-download/remote", - expectedOutput: `^test = <