Add test unifi controller for CI
This commit is contained in:
42
.github/workflows/go.yml
vendored
Normal file
42
.github/workflows/go.yml
vendored
Normal 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/
|
||||
Reference in New Issue
Block a user