Skip to content

feat: support for route tables & routes #1230

feat: support for route tables & routes

feat: support for route tables & routes #1230

Workflow file for this run

---
name: Unit test
on:
pull_request_target:
types: ['opened', 'reopened', 'synchronize', 'labeled']
merge_group:
workflow_dispatch:
inputs:
test_filter:
type: string
default: ''
description: Filter for the tests to run
required: false
terratest_log:
type: string
default: ''
description: Enable Terratest logging
required: false
permissions:
contents: read
pull-requests: read
id-token: write
actions: read
checks: read
deployments: read
concurrency:
group: unittest-${{ github.event.pull_request.head.repo.full_name }}/${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
unittest:
name: Unit test
runs-on: ubuntu-latest
environment: CSUTF-RO
if: |
(
github.event.pull_request.head.repo.full_name == 'Azure/terraform-azurerm-lz-vending'
)
||
(
github.event.pull_request.head.repo.full_name != 'Azure/terraform-azurerm-lz-vending'
&&
contains(github.event.pull_request.labels.*.name, 'PR: Safe to test :test_tube:')
)
||
(
github.event_name == 'workflow_dispatch'
)
||
(
github.event_name == 'merge_group'
)
strategy:
fail-fast: false
matrix:
azapi_version: ['latest', '1.11.0']
azurerm_version: ['latest', '3.7.0']
terraform_version: ['latest', '1.4.0']
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform_version }}
terraform_wrapper: false
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: tests/go.mod
cache-dependency-path: tests/go.sum
- name: Set GOMAXPROCS to 2 * number of cores
run: |
CORES="$(grep -Pc '^processor\t' /proc/cpuinfo)"
((DOUBLE=CORES*2))
echo "Setting GOMAXPROCS to $DOUBLE"
echo "GOMAXPROCS=$DOUBLE" >> "$GITHUB_ENV"
- name: Go test
run: make TESTARGS='-v' TESTFILTER='${{ github.event.inputs.test_filter }}' test
env:
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
ARM_USE_OIDC: true
AZAPI_VERSION: ${{ matrix.azapi_version }}
AZURERM_VERSION: ${{ matrix.azurerm_version }}
TERRATEST_LOG: ${{ github.event.inputs.terratest_log }}