Skip to content

Commit

Permalink
fix: remove Go action and use Go cache for Windows (#3097)
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Laine <philip.laine@gmail.com>
  • Loading branch information
phillebaba authored Oct 15, 2024
1 parent 59ee9e0 commit 08f04c0
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 30 deletions.
10 changes: 0 additions & 10 deletions .github/actions/golang/action.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/check-go-mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Test go mod
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Build the Zarf binary
run: make build-cli-linux-amd
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down Expand Up @@ -107,7 +109,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -140,7 +144,9 @@ jobs:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/scan-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/scan-docs-and-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Docs and schemas
run: "make test-docs-and-schema"
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down Expand Up @@ -67,7 +69,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -102,7 +106,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Setup K3d
uses: ./.github/actions/k3d
Expand Down Expand Up @@ -144,7 +150,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -182,7 +190,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Setup Kind
run: |
Expand Down Expand Up @@ -226,7 +236,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Setup Minikube
run: minikube start --driver=docker
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
go-version-file: go.mod

- name: Run test Go program that imports Zarf
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Run unit tests
run: make test-unit
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Build PR binary and zarf init package
uses: ./.github/actions/packages
Expand Down Expand Up @@ -66,7 +68,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Run Windows unit tests
run: make test-unit
shell: pwsh
Expand All @@ -46,6 +51,11 @@ jobs:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Build Windows binary and zarf packages
uses: ./.github/actions/packages
with:
Expand Down

0 comments on commit 08f04c0

Please sign in to comment.