Files
terraform-provider-unifi/.github/workflows/acctest.yml
2020-10-03 13:15:03 -04:00

84 lines
1.7 KiB
YAML

name: Acceptance Tests
on:
pull_request:
paths-ignore:
- 'README.md'
push:
paths-ignore:
- 'README.md'
schedule:
- cron: '0 13 * * *'
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: '1.15'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.3
- name: Get dependencies
run: |
go mod download
- name: Build
run: |
go build -v .
test:
name: Matrix Test
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
version:
# TODO: add lts support to SDK
# - lts
- stable
terraform:
- '0.12.29'
- '0.13.3'
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.3
with:
go-version: '1.15'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.3
# TODO: convert this to `services`
- name: Start Unifi controller
run: |
./controller.sh start ${{ matrix.version }}
- name: Get dependencies
run: |
go mod download
- name: TF acceptance tests
timeout-minutes: 10
env:
TF_ACC: "1"
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
UNIFI_USERNAME: tfacctest
UNIFI_PASSWORD: tfacctest1234
UNIFI_API: https://localhost:8443/
UNIFI_ACC_WLAN_CONCURRENCY: "4"
UNIFI_INSECURE: 'true'
run: |
go test -v -cover ./internal/provider/