Use docker-compose instead of a shell script (#155)

This commit is contained in:
Joshua Spence
2021-09-15 09:51:58 +10:00
committed by GitHub
parent f38166b55c
commit a2ce5a12fb
4 changed files with 64 additions and 106 deletions

View File

@@ -9,7 +9,6 @@ on:
schedule:
- cron: '0 13 * * *'
jobs:
build:
name: Build
runs-on: ubuntu-latest
@@ -20,18 +19,12 @@ jobs:
uses: actions/setup-go@v2.1.4
with:
go-version: '1.16'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.4
- name: Get dependencies
run: |
go mod download
- name: Build
run: |
go build -v .
run: make build
test:
name: Matrix Test
@@ -41,13 +34,13 @@ jobs:
strategy:
fail-fast: false
matrix:
version:
unifi_version:
- 'stable-5'
- '6.0'
- '6.1'
- '6.2'
- 'v6'
terraform:
terraform_version:
- '0.15.5'
- '1.0.6'
steps:
@@ -56,30 +49,14 @@ jobs:
uses: actions/setup-go@v2.1.4
with:
go-version: '1.16'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2.3.4
# TODO: convert this to `services`
- name: Start Unifi controller
run: |
./controller.sh start ${{ matrix.version }}
- name: Get dependencies
run: |
go mod download
- run: make testacc-up UNIFI_VERSION=${{ matrix.unifi_version }}
- name: TF acceptance tests
timeout-minutes: 10
env:
TF_ACC: "1"
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
run: make testacc TF_ACC_TERRAFORM_VERSION=${{ matrix.terraform_version }}
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/
- run: make testacc-down