Skip to content

Feature/resources-onboarding-team #55

Feature/resources-onboarding-team

Feature/resources-onboarding-team #55

Workflow file for this run

name: "Test TF-Provider on SG-Prod"
on:
push:
branches:
- main
- devel
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
pull_request:
branches:
- 'main'
types: [opened, edited, reopened, synchronize, ready_for_review]
schedule:
- cron: '0 4 * * 1'
workflow_dispatch:
workflow_call:
jobs:
provider-project_test:
name: "Test Provider project"
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Install Go"
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: "Install Terraform"
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
terraform_version: '1.5.7' # TODO: matrix of terraform & tofu versions
- name: "Build Provider"
run: make build
- name: "Test Provider with acceptance tests"
run: make test-acc
env:
STACKGUARDIAN_API_KEY: ${{ secrets.STACKGUARDIAN_API_KEY }}
STACKGUARDIAN_ORG_NAME: ${{ secrets.STACKGUARDIAN_ORG_NAME }}
- name: "Test Provider with quickstart example"
run: |
set -eu -x;
make install;
make test-example ARGS="-f local-build";
shell: bash
env:
STACKGUARDIAN_API_KEY: ${{ secrets.STACKGUARDIAN_API_KEY }}
STACKGUARDIAN_ORG_NAME: ${{ secrets.STACKGUARDIAN_ORG_NAME }}
- name: "Check Provider docs"
run: |
set -eu -x;
make tools-install;
make docs-validate;
shell: bash