diff --git a/.github/workflows/acctest.yml b/.github/workflows/acctest.yml index 1db3d78..28d62af 100644 --- a/.github/workflows/acctest.yml +++ b/.github/workflows/acctest.yml @@ -7,6 +7,8 @@ on: - "tools/**" - "main.go" - "docker-compose.yaml" + - ".github/workflows/acctest.yml" + - "Makefile" push: branches: - "main" @@ -18,13 +20,15 @@ on: - "tools/**" - "main.go" - "docker-compose.yaml" + - ".github/workflows/acctest.yml" + - "Makefile" schedule: - cron: "0 13 * * *" jobs: test: name: Matrix Test runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -56,12 +60,13 @@ jobs: 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: 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: "all" + 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" \ No newline at end of file diff --git a/Makefile b/Makefile index 48baba1..84c0ad3 100644 --- a/Makefile +++ b/Makefile @@ -12,4 +12,5 @@ build: .PHONY: testacc testacc: - TF_LOG_PROVIDER=debug TF_ACC=1 go test $(TEST) -test.parallel 2 -v -count $(TEST_COUNT) -timeout $(TEST_TIMEOUT) $(TESTARGS) + go build ./... + TF_LOG_PROVIDER=debug TF_ACC=1 go test $(TEST) -v -count $(TEST_COUNT) -timeout $(TEST_TIMEOUT) $(TESTARGS)