Bumps [actions/setup-go](https://github.com/actions/setup-go) from v2.1.1 to v2.1.2. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2.1.1...8a3a76c2171de8c3be20bec507b6d829ccae48ba) Signed-off-by: dependabot[bot] <support@github.com>
86 lines
1.7 KiB
YAML
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.2
|
|
with:
|
|
go-version: 1.14
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2.3.2
|
|
|
|
- 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.2
|
|
with:
|
|
go-version: 1.14
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2.3.2
|
|
|
|
# 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/
|