Merge branch 'master' into destroy-flag #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go build | |
on: [ push ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
id: go | |
- name: Get dependencies | |
run: | | |
go mod download | |
- name: Build | |
run: | | |
make build | |
- name: Run unit tests | |
run: | | |
make test | |
acceptance: | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
services: | |
vault: | |
image: hashicorp/vault | |
env: | |
VAULT_DEV_ROOT_TOKEN_ID: ROOT_TOKEN | |
options: >- | |
--health-cmd "VAULT_ADDR=http://127.0.0.1:8200 vault status" | |
--health-interval 1s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 8200:8200 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
# setup-terraform is used to install the Terraform CLI. If we don't do | |
# this then the terraform-plugin-sdk will attempt to download it for each test! | |
- uses: hashicorp/setup-terraform@v2 | |
with: | |
terraform_version: '1.5.*' | |
terraform_wrapper: false | |
- name: Check Terraform CLI version | |
run: terraform --version | |
- name: Acceptance Tests | |
env: | |
VAULT_TOKEN: "ROOT_TOKEN" | |
VAULT_ADDR: "http://localhost:8200" | |
# RUNS_IN_CONTAINER is false if not using jobs.<job_id>.container | |
RUNS_IN_CONTAINER: "false" | |
run: make testacc |