Skip to content

TF Acceptance Tests Workflow #40

TF Acceptance Tests Workflow

TF Acceptance Tests Workflow #40

Workflow file for this run

name: TF Acceptance Tests Workflow
on:
push:
branches: ["main"]
workflow_dispatch:
all:
type: boolean
description: "Run ACC tests for all services"
loadbalancer:
type: boolean
iaas:
type: boolean
jobs:
main:
name: Acceptance Tests
runs-on: ubuntu-latest
environment: Acceptance tests
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
- service: "loadbalancer"
# TODO: place proper project id, organization id, ... here
project-id: "66b03760-125b-4c63-9624-741e8a418c02"
organization-id: "d83100e9-9be4-45ad-b874-28166786ec0c"
parent-container-id: "developer-tools-test-DueErq1"
parent-uuid: "d83100e9-9be4-45ad-b874-28166786ec0c"
- service: "iaas"
# TODO: place proper project id, organization id, ... here
project-id: "66b03760-125b-4c63-9624-741e8a418c02"
organization-id: "d83100e9-9be4-45ad-b874-28166786ec0c"
parent-container-id: "developer-tools-test-DueErq1"
parent-uuid: "d83100e9-9be4-45ad-b874-28166786ec0c"
if: ${{ github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (github.event.inputs[matrix.service] || github.event.inputs.all)) }}

Check failure on line 37 in .github/workflows/tf-acc-test.yaml

View workflow run for this annotation

GitHub Actions / TF Acceptance Tests Workflow

Invalid workflow file

The workflow is not valid. .github/workflows/tf-acc-test.yaml (Line: 37, Col: 9): Unrecognized named-value: 'matrix'. Located at position 111 within expression: github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && (github.event.inputs[matrix.service] || github.event.inputs.all))
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go ${{ inputs.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Install project tools and dependencies
run: make project-tools
- name: Run acc test
run: go test -timeout=30m ./stackit/internal/services/${{ matrix.service }}/${{ matrix.service }}_acc_test.go
env:
TF_ACC: 1
TF_ACC_REGION: "eu01"
TF_ACC_PROJECT_ID: "${{ matrix.project-id }}"
#TF_ACC_PROJECT_ID: "${{ secrets.TF_ACC_PROJECT_ID }}"
TF_ACC_ORGANIZATION_ID: "${{ matrix.organization-id }}"
#TF_ACC_ORGANIZATION_ID: "${{ secrets.TF_ACC_ORGANIZATION_ID }}"
TF_ACC_TEST_PROJECT_PARENT_CONTAINER_ID: "${{ matrix.parent-container-id }}"
#TF_ACC_TEST_PROJECT_PARENT_CONTAINER_ID: "${{ secrets.TF_ACC_TEST_PROJECT_PARENT_CONTAINER_ID }}"
TF_ACC_TEST_PROJECT_PARENT_UUID: "${{ matrix.parent-container-id }}"
#TF_ACC_TEST_PROJECT_PARENT_UUID: "${{ secrets.TF_ACC_TEST_PROJECT_PARENT_UUID }}"
TF_ACC_TEST_PROJECT_SERVICE_ACCOUNT_EMAIL: ${{ secrets.TF_ACC_TEST_PROJECT_SERVICE_ACCOUNT_EMAIL }}
TF_ACC_TEST_PROJECT_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TF_ACC_TEST_PROJECT_SERVICE_ACCOUNT_TOKEN }}
TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ secrets.TF_ACC_TEST_PROJECT_USER_EMAIL }}
STACKIT_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TF_ACC_SERVICE_ACCOUNT_TOKEN }}