Build(deps): Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 #350
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
# Terraform Provider testing workflow. | |
name: Tests | |
on: | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
types: [opened, synchronize, reopened, ready_for_review] | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
# Testing only needs permissions to read the repository contents. | |
permissions: | |
contents: read | |
# Default values to simplify job configurations below. | |
env: | |
# Go language version to use for building. This value should also be updated | |
# in the release workflow if changed. | |
GO_VERSION: '1.22' | |
jobs: | |
# Ensure project builds before running testing matrix | |
build: | |
if: github.event.pull_request.draft == false | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: actions/checkout@v4 | |
- run: go mod download | |
- run: go build -v . | |
generate: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: actions/checkout@v4 | |
- 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: | |
if: github.event.pull_request.draft == false | |
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: | |
- '1.8.*' | |
- '1.9.*' | |
steps: | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${{ matrix.terraform }} | |
terraform_wrapper: false | |
- uses: actions/checkout@v4 | |
- run: go mod download | |
- env: | |
FLAGSMITH_MASTER_API_KEY: ${{ secrets.FLAGSMITH_MASTER_API_KEY }} | |
FLAGSMITH_FEATURE_NAME: test_feature | |
FLAGSMITH_ENVIRONMENT_KEY: ${{ secrets.FLAGSMITH_ENVIRONMENT_KEY }} | |
FLAGSMITH_ENVIRONMENT_ID: 18143 | |
FLAGSMITH_FEATURE_ID: 25142 | |
FLAGSMITH_PROJECT_UUID: 97907de4-66d4-4d78-aae3-04f5a4518a55 | |
FLAGSMITH_PROJECT_ID: 7721 | |
FLAGSMITH_ORGANISATION_UUID: 0ee0578e-f2b8-467d-ba49-4cda324cea91 | |
FLAGSMITH_ORGANISATION_ID: 6880 | |
TF_ACC: "1" | |
run: go test -v -cover ./flagsmith/ | |
timeout-minutes: 10 |