Release/v0.1.0 #52
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
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 |