Skip to content

feat: support default pg meta store #344

feat: support default pg meta store

feat: support default pg meta store #344

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_target:
paths:
- internal/**
- pkg/**
- tools/**
- go.mod
- go.sum
- .github/workflows/test.yml
push:
paths:
- internal/**
- pkg/**
- tools/**
- go.mod
- go.sum
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
type: choice
options:
- info
- warning
- debug
# 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
with:
ref: ${{ github.head_ref }}
- 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
skip-cache: true
skip-save-cache: true
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/[email protected]
with:
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: 60
strategy:
fail-fast: false
matrix:
terraform:
- '1.5.*'
- '1.6.*'
- '1.7.*'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- env:
TF_ACC: "1"
TF_LOG: "INFO"
RWC_ENDPOINT: ${{ secrets.RWC_ENDPOINT }}
RWC_API_KEY: ${{ secrets.RWC_API_KEY }}
RWC_API_SECRET: ${{ secrets.RWC_API_SECRET }}
TEST_NAMESPACE: ${{ matrix.terraform }}
RWC_MOCK: "1"
TEST_PRIVATE_LINK_TARGET: ${{ secrets.TEST_PRIVATE_LINK_TARGET }}
TEST_BYOC_ENV: ${{ secrets.TEST_BYOC_ENV }}
run: go test -v -timeout 30m github.com/risingwavelabs/terraform-provider-risingwavecloud/internal/provider/acctest
timeout-minutes: 20