|
@@ -15,12 +15,6 @@ on:
|
|
|
permissions:
|
|
|
contents: read
|
|
|
|
|
|
-# Default values to simplify job configurations below.
|
|
|
-env:
|
|
|
- # Go language version to use for building. This value should also be updated
|
|
|
- # in the release workflow if changed.
|
|
|
- GO_VERSION: '1.17'
|
|
|
-
|
|
|
jobs:
|
|
|
# Ensure project builds before running testing matrix
|
|
|
build:
|
|
@@ -28,20 +22,22 @@ jobs:
|
|
|
runs-on: ubuntu-latest
|
|
|
timeout-minutes: 5
|
|
|
steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
- uses: actions/setup-go@v3
|
|
|
with:
|
|
|
- go-version: ${{ env.GO_VERSION }}
|
|
|
- - uses: actions/checkout@v3
|
|
|
+ go-version-file: 'go.mod'
|
|
|
+ cache: true
|
|
|
- run: go mod download
|
|
|
- run: go build -v .
|
|
|
|
|
|
generate:
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
- uses: actions/setup-go@v3
|
|
|
with:
|
|
|
- go-version: ${{ env.GO_VERSION }}
|
|
|
- - uses: actions/checkout@v3
|
|
|
+ go-version-file: 'go.mod'
|
|
|
+ cache: true
|
|
|
- run: go generate ./...
|
|
|
- name: git diff
|
|
|
run: |
|
|
@@ -62,14 +58,15 @@ jobs:
|
|
|
- '1.0.*'
|
|
|
- '1.1.*'
|
|
|
steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
- uses: actions/setup-go@v3
|
|
|
with:
|
|
|
- go-version: ${{ env.GO_VERSION }}
|
|
|
+ go-version-file: 'go.mod'
|
|
|
+ cache: true
|
|
|
- uses: hashicorp/setup-terraform@v2
|
|
|
with:
|
|
|
terraform_version: ${{ matrix.terraform }}
|
|
|
terraform_wrapper: false
|
|
|
- - uses: actions/checkout@v3
|
|
|
- run: go mod download
|
|
|
- env:
|
|
|
TF_ACC: "1"
|