-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (37 loc) · 1.34 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
on: [push, pull_request]
name: Acceptance Testing
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
go-version:
- "1.20"
sensu-version:
- "5.21.0"
- "6.11.0"
env:
TF_ACC: "1"
GO111MODULE: "on"
TF_LOG: "DEBUG"
SENSU_API_URL: "http://127.0.0.1:8080"
SENSU_USERNAME: "admin"
SENSU_PASSWORD: "P@ssw0rd!"
SENSU_ENVIRONMENT: "default"
SENSU_ORGANIZATION: "default"
SENSU_VERSION: ${{ matrix.sensu-version }}
steps:
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Setup Sensu from ${{ matrix.sensu-version }}
run: |
docker pull sensu/sensu:${{ matrix.sensu-version }}
docker run -v /var/lib/sensu:/var/lib/sensu -d --name sensu-backend -p 2380:2380 -p 3000:3000 -p 8080:8080 -p 8081:8081 sensu/sensu:${{ matrix.sensu-version }} sensu-backend start
docker run -v /var/lib/sensu:/var/lib/sensu -d --name sensu-agent sensu/sensu:${{ matrix.sensu-version }} sensu-agent start --backend-url ws://localhost:8081 --subscriptions webserver,system --cache-dir /var/lib/sensu
- uses: actions/checkout@v2
- run: make fmtcheck
- run: make vet
- run: make testacc