Skip to content

fix(segment): fix create feature specific segment (#156) #332

fix(segment): fix create feature specific segment (#156)

fix(segment): fix create feature specific segment (#156) #332

Workflow file for this run

# 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
TF_ACC: "1"
run: go test -v -cover ./flagsmith/
timeout-minutes: 10