From f5d45bbc2a1f0e0a30944208aa427be7e5922236 Mon Sep 17 00:00:00 2001 From: William Guilherme Date: Mon, 20 Nov 2023 10:19:23 -0800 Subject: [PATCH] fix: Updated to go v1.20 --- .github/workflows/release.yml | 10 ++++---- .github/workflows/reuse-zia-tests.yml | 36 +++++++++++++++++++++------ go.mod | 2 +- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fc3dcd3..0b321d6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,15 +28,15 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: "1.20" - name: Import GPG key id: import_gpg - uses: paultyng/ghaction-import-gpg@v2.1.0 - env: + uses: crazy-max/ghaction-import-gpg@v6 # These secrets will need to be configured for the repository: - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - PASSPHRASE: ${{ secrets.PASSPHRASE }} + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5.0.0 diff --git a/.github/workflows/reuse-zia-tests.yml b/.github/workflows/reuse-zia-tests.yml index a572e090..7866f34a 100644 --- a/.github/workflows/reuse-zia-tests.yml +++ b/.github/workflows/reuse-zia-tests.yml @@ -24,19 +24,39 @@ jobs: environment: ${{ inputs.environment }} strategy: matrix: - go-version: [1.19] + go-version: [1.20] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/setup-go@v4 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - - uses: actions/cache@v3 + + - name: Setup Go + uses: actions/setup-go@v4 with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go${{ matrix.go-version }}-${{ hashFiles('**/go.mod') }}-${{ hashFiles('**/go.sum') }} + go-version: "1.20" + + - name: Setup Go Tools + run: make tools + + - name: Download Go Dependencies + run: | + go mod tidy && go mod vendor + + - name: Setup Go Tools + run: make tools + + - name: Check Formatting + run: make fmtcheck + + - name: Vet Code + run: make vet + + - name: Lint Code + run: make lint + + - name: Check Build + run: make build - name: Run tests with retry uses: nick-invision/retry@v2 diff --git a/go.mod b/go.mod index c6ed90ff..c8584041 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/zscaler/terraform-provider-zia/v2 -go 1.18 +go 1.20 require ( github.com/biter777/countries v1.7.1