Skip to content

Commit

Permalink
Add gitkeep and go releaser to test phase
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-r-west committed Feb 16, 2022
1 parent 58ed2e7 commit c762a53
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
-
name: Import GPG key
id: import_gpg
Expand Down
29 changes: 24 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 15
steps:

- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: '1.15'
go-version: '1.17'
id: go

- name: Check out code into the Go module directory
Expand All @@ -46,10 +46,29 @@ jobs:
echo "If this fails you should run \"terraform fmt -recursive\""
terraform fmt -recursive -check
- name: Import GPG key
id: import_gpg
uses: hashicorp/ghaction-import-gpg@v2.1.0
env:
# These secrets will need to be configured for the repository:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --snapshot --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GitHub sets this automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: |
go build -v .
# run acceptance tests in a matrix with Terraform core versions
test:
name: Matrix Test
Expand All @@ -63,13 +82,13 @@ jobs:
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '0.15.3'
- '1.1.5'
steps:

- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: '1.15'
go-version: '1.17'
id: go

- name: Check out code into the Go module directory
Expand All @@ -80,7 +99,7 @@ jobs:
go mod download
- name: TF acceptance tests
timeout-minutes: 10
timeout-minutes: 15
env:
TF_ACC: "1"
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ website/node_modules
*.iml
*.test

docs/
!docs/.gitkeep

internal/provider/docs/build/*
!internal/provider/docs/build/.gitkeep

Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ before:
hooks:
# this is just an example and not a requirement for provider building/publishing
- go mod tidy
- make docs
builds:
- env:
# goreleaser does not work with CGO, it could also complicate
Expand Down
Empty file added docs/.gitkeep
Empty file.

0 comments on commit c762a53

Please sign in to comment.