Files
terraform-provider-unifi/.github/workflows/acctest.yml
2020-08-18 17:13:33 -04:00

86 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.1
with:
go-version: 1.14
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.1
- 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:
# including a few versions here just in case
- '0.12.26'
- '0.12.29'
- '0.13.0'
steps:
- name: Set up Go
uses: actions/setup-go@v2.1.1
with:
go-version: 1.14
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.1
# 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/api/
UNIFI_ACC_WLAN_CONCURRENCY: "4"
UNIFI_INSECURE: 'true'
run: |
go test -v -cover ./internal/provider/