Files
terraform-provider-unifi/.github/workflows/acctest.yml
Adam Nadrowski fb2d9762d8 ci: remove PR trigger from acceptance tests
Acceptance tests require a running UniFi controller and are too
heavyweight to run on every PR. They still run on push to main,
daily schedule, and manual workflow_dispatch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 12:34:52 -05:00

70 lines
1.7 KiB
YAML

name: Acceptance Tests
on:
push:
branches:
- "main"
tags:
- "v*"
paths:
- "internal/**"
- "scripts/**"
- "tools/**"
- "main.go"
- "docker-compose.yaml"
- ".github/workflows/acctest.yml"
- "Makefile"
schedule:
- cron: "0 13 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
test:
name: Matrix Test
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
unifi_version:
- "v6.5"
- "v6"
- "v7.0"
- "v7.1"
- "v7.2"
- "v7.3"
- "v7.4"
- "v7.5"
- "v7"
- "v8.0"
- "v8.1"
- "v8.2"
- "v8.3"
- "v8.4"
- "v8.5"
- "v8.6"
- "v8"
- "v9.0"
- "v9"
- "latest"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
check-latest: true
- name: Set up Terraform
uses: "hashicorp/setup-terraform@v3"
# The acceptance tests sometimes timeout for some unknown reason.
- name: TF acceptance tests
uses: "nick-fields/retry@v3"
with:
timeout_minutes: 20
max_attempts: 3
command: export TF_PLUGIN_CACHE_DIR=$(mktemp -d) && make testacc TEST_TIMEOUT=1h UNIFI_STDOUT=true UNIFI_VERSION=${{ matrix.unifi_download_url && 'beta' || matrix.unifi_version }} UNIFI_DOWNLOAD_URL=${{ matrix.unifi_download_url }}
retry_on: "timeout"