Skip to content

Fix tests and go mod tidy #150

Fix tests and go mod tidy

Fix tests and go mod tidy #150

Workflow file for this run

name: "Test TF-Provider on API-PROD"
on:
push:
branches:
- main
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
env:
GOPRIVATE: github.com/StackGuardian/sg-sdk-go
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Install Go"
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: "Install Terraform"
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
terraform_version: '1.9.8'
- name: "Build Provider"
run: make build
- name: "Test Provider with acceptance tests"
run: make test-acc
env:
STACKGUARDIAN_API_URI: '${{ secrets.SG_PRD_API_URI }}'
STACKGUARDIAN_API_KEY: '${{ secrets.SG_PRD_API_KEY }}'
STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_PRD_ORG_NAME }}'
# - name: "Test Provider with quickstart example"
# run: |
# set -eu -x;
# make install;
# make test-examples-quickstart ARGS="-f local-build";
# shell: bash
# env:
# STACKGUARDIAN_API_KEY: '${{ secrets.SG_PRD_API_KEY }}'
# STACKGUARDIAN_API_URI: '${{ secrets.SG_PRD_API_URI }}'
# STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_PRD_ORG_NAME }}'
# - name: "Test Provider with onboarding example"
# run: |
# set -eu -x;
# make install;
# make test-examples-onboarding ARGS="-f local-build";
# shell: bash
# env:
# STACKGUARDIAN_API_KEY: '${{ secrets.SG_PRD_API_KEY }}'
# STACKGUARDIAN_API_URI: '${{ secrets.SG_PRD_API_URI }}'
# STACKGUARDIAN_ORG_NAME: '${{ secrets.SG_PRD_ORG_NAME }}'
- name: "Check Provider docs"
run: |
set -eu -x;
make tools-install;
make docs-validate;
shell: bash