Add test unifi controller for CI

This commit is contained in:
Paul Tyng
2020-01-09 12:48:46 -05:00
parent 1f60f1b71f
commit 0bfd628114
2 changed files with 52 additions and 18 deletions

42
.github/workflows/go.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Go
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
# TODO: convert this to `services`
- name: Start Unifi controller
run: |
./controller.sh
- name: Get dependencies
run: |
go mod download
- name: Build
run: |
go build -v .
- name: TF acceptance tests
timeout-minutes: 10
env:
TF_ACC: "1"
UNIFI_USERNAME: tfacctest
UNIFI_PASSWORD: tfacctest1234
UNIFI_API: https://localhost:8443/api/
UNIFI_ACC_WLAN_CONCURRENCY: "4"
run: |
go test -v -cover ./internal/provider/