Skip to content

Bump github.com/hashicorp/terraform-plugin-go from 0.23.0 to 0.24.0 (#3) #11

Bump github.com/hashicorp/terraform-plugin-go from 0.23.0 to 0.24.0 (#3)

Bump github.com/hashicorp/terraform-plugin-go from 0.23.0 to 0.24.0 (#3) #11

Workflow file for this run

# Terraform Provider testing workflow.
name: Tests
# This GitHub action runs your tests for each pull request and push.
# Optionally, you can turn it on using a schedule for regular testing.
on:
pull_request:
paths-ignore:
- "README.md"
push:
branches:
- main
paths-ignore:
- "README.md"
# Testing only needs permissions to read the repository contents.
permissions:
contents: read
jobs:
# Ensure project builds before running testing matrix
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- run: go mod download
- run: go build -v .
- name: Run linters
uses: golangci/golangci-lint-action@v6
with:
version: latest
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/[email protected]
with:
terraform_version: "1.9.5"
terraform_wrapper: false
- run: go generate ./...
- name: git diff
run: |
git diff --compact-summary --exit-code || \
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1)
# Run acceptance tests in a matrix with Terraform CLI versions
test:
name: Terraform Provider Acceptance Tests
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- version: "1.0.*"
name: "TF-1.0"
- version: "1.9.*"
name: "TF-1.9"
console:
- "1.25.0"
- "1.26.0"
- "1.27.0"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/[email protected]
with:
terraform_version: ${{ matrix.terraform.version }}
terraform_wrapper: false
- run: go mod download
- run: make pull_test_assets
timeout-minutes: 10
- name: Set License if not dependabot
run: |
if [ "${{ github.actor }}" != "dependabot[bot]" ]; then
echo "CDK_LICENSE=${{ secrets.TEST_LICENSE }}" >> "$GITHUB_ENV"
fi
- name: Run acceptance tests
env:
TF_ACC: "1"
TESTARGS: "-cover ./internal/provider/"
CONDUKTOR_CONSOLE_IMAGE: conduktor/conduktor-console:${{ matrix.console }}
CONDUKTOR_CONSOLE_CORTEX_IMAGE: conduktor/conduktor-console-cortex:${{ matrix.console }}
CDK_BASE_URL: http://localhost:8080
CDK_ADMIN_EMAIL: [email protected]
CDK_ADMIN_PASSWORD: test
TF_LOG_PROVIDER_CONDUKTOR: DEBUG
timeout-minutes: 15
run: |
# empty env to avoid any conflict with the current env
echo "" > .env
make testacc
- uses: actions/upload-artifact@v4
if: always()
with:
name: api-logs-CDK-${{ matrix.console }}-${{ matrix.terraform.name }}
path: ./logs/
if-no-files-found: error
retention-days: 1