more debug and query for user #2135
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: Build | |
on: | |
push: | |
paths-ignore: | |
- 'website/**' | |
- 'CHANGELOG.md' | |
workflow_dispatch: | |
permissions: | |
# Permission for checking out code | |
contents: read | |
jobs: | |
go-version: | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.go-version.outputs.version }} | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- id: go-version | |
run: echo "version=$(cat .go-version)" >> "$GITHUB_OUTPUT" | |
build: | |
needs: [go-version] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version-file: '.go-version' | |
cache: false | |
# 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@v3 | |
with: | |
terraform_version: '1.7.*' | |
terraform_wrapper: false | |
- name: Cache go build | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
~/Library/Caches/go-build | |
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-golang- | |
- name: Build | |
run: | | |
make build | |
- name: Run unit tests | |
# here to short-circuit the acceptance tests, in the case of a failure. | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
run: | | |
make test | |
acceptance: | |
needs: [go-version, build] | |
runs-on: custom-linux-large | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- "vault-enterprise:1.18.0-ent" | |
services: | |
vault: | |
image: hashicorp/${{ matrix.image }} | |
env: | |
VAULT_DEV_ROOT_TOKEN_ID: root | |
VAULT_LICENSE: ${{ secrets.VAULT_LICENSE }} | |
VAULT_AUTH_CONFIG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VAULT_LOCAL_CONFIG: | | |
{"plugin_directory": "/vault/plugins"} | |
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 | |
volumes: | |
- ${{ github.workspace }}:/vault/plugins | |
postgres: | |
image: docker.mirror.hashicorp.services/postgres:latest | |
env: | |
POSTGRES_PASSWORD: secret | |
POSTGRES_DB: database | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
go-version-file: '.go-version' | |
cache: false | |
# 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@v3 | |
with: | |
terraform_version: '1.7.*' | |
terraform_wrapper: false | |
- name: Check Terraform CLI version | |
run: terraform --version | |
- name: Cache go build | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
~/Library/Caches/go-build | |
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-golang- | |
- name: Acceptance Tests | |
env: | |
VAULT_TOKEN: "root" | |
VAULT_ADDR: "http://localhost:8200" | |
# RUNS_IN_CONTAINER is false if not using jobs.<job_id>.container | |
RUNS_IN_CONTAINER: "false" | |
MYSQL_URL: "root:mysql@tcp(mysql:3306)/" | |
MYSQL_CONNECTION_URL: "{{username}}:{{password}}@tcp(mysql:3306)/" | |
MYSQL_CONNECTION_USERNAME: "root" | |
MYSQL_CONNECTION_PASSWORD: "mysql" | |
MONGODB_URL: "mongodb://root:mongodb@mongo:27017/admin?ssl=false" | |
MSSQL_URL: "sqlserver://sa:${{ secrets.MSSQL_SA_PASSWORD }}@mssql:1433" | |
POSTGRES_URL: "postgres://postgres:secret@postgres:5432/database?sslmode=disable" | |
COUCHBASE_HOST: couchbase | |
COUCHBASE_USERNAME: Administrator | |
COUCHBASE_PASSWORD: password | |
CONSUL_HTTP_ADDR: "consul:8500" | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
LDAP_BINDDN: "cn=admin,dc=example,dc=org" | |
LDAP_BINDPASS: "adminpassword" | |
LDAP_URL: "ldap://openldap:1389" | |
VAULT_PLUGIN_COMMAND: ${{ steps.plugin.outputs.command }} | |
run: | | |
TF_ACC_ENTERPRISE=1 TF_ACC=1 go test -v -run TestAccDatabaseSecretBackendStaticRole_Rootless ./vault/... -timeout 30m ./... |