Skip to content

Add simple Organization DataSource and implement integration acceptance tests #10

Add simple Organization DataSource and implement integration acceptance tests

Add simple Organization DataSource and implement integration acceptance tests #10

Workflow file for this run

# Terraform Provider testing workflow.
name: Acceptance Tests
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:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: true
- run: go mod download
- run: go build -v .
testacc:
# This job runs on push to main branch.
name: Terraform Provider Acceptance Tests
needs: build
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '1.7.*'
- '1.6.*'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: true
- name: Echo environment variables
run: |
echo "ASTRO_ORGANIZATION_ID=$ASTRO_ORGANIZATION_ID"
echo "ASTRO_API_HOST=$ASTRO_API_HOST"
env:
ASTRO_ORGANIZATION_ID: ${{ env.DEV_ASTRO_ORGANIZATION_ID }}
ASTRO_API_HOST: ${{ env.DEV_ASTRO_API_HOST }}
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- env:
TF_ACC: "1"
ASTRO_API_TOKEN: ${{ secrets.DEV_ASTRO_API_TOKEN }}
ASTRO_ORGANIZATION_ID: ${{ env.DEV_ASTRO_ORGANIZATION_ID }}
ASTRO_API_HOST: ${{ env.DEV_ASTRO_API_HOST }}
run: make testacc
timeout-minutes: 10