Skip to content

Commit 48fbc38

Browse files
committed
Fixed integration tests
1 parent f5fe511 commit 48fbc38

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,22 @@ jobs:
4040
zabbix:
4141
- version: "4.0"
4242
suffix: "-latest"
43+
postgress_version: "15-alpine"
4344
- version: "5.0"
4445
suffix: "-latest"
46+
postgress_version: "15-alpine"
4547
- version: "6.0"
4648
suffix: "-latest"
49+
postgress_version: "15-alpine"
4750
- version: "6.2"
4851
suffix: "-latest"
52+
postgress_version: "15-alpine"
4953
- version: "6.4"
5054
suffix: "-latest"
51-
- version: "trunk" # will become 7.0
52-
suffix: ""
55+
postgress_version: "16-alpine"
56+
- version: "7.0"
57+
suffix: "-latest"
58+
postgress_version: "16-alpine"
5359

5460
name: "Zabbix ${{ matrix.zabbix.version }} Integration Tests"
5561

@@ -67,16 +73,22 @@ jobs:
6773
env:
6874
ZBX_VERSION: "${{ matrix.zabbix.version }}"
6975
ZBX_VERSION_SUFFIX: "${{ matrix.zabbix.suffix }}"
76+
POSTGRES_VERSION: "${{ matrix.zabbix.postgress_version }}"
7077

7178
- name: Wait for Zabbix server to become available
72-
uses: iFaxity/[email protected]
79+
id: wait_for_server
80+
uses: iFaxity/[email protected]
7381
with:
7482
resource: tcp:localhost:10051
75-
timeout: 900000
83+
timeout: 300000
7684
interval: 10000
7785
delay: 60000
7886
log: true
7987

88+
- name: Server logs
89+
if: always() && steps.wait_for_server.outcome == 'failure'
90+
run: docker compose -f "docker-compose.yml" logs server
91+
8092
- name: Test
8193
run: go test -v "./test/integration/..."
8294

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ services:
1111
- POSTGRES_DB=zabbix
1212

1313
database:
14-
image: postgres
14+
image: postgres:${POSTGRES_VERSION:-alpine}
1515
environment:
1616
- POSTGRES_USER=zabbix
1717
- POSTGRES_PASSWORD=zabbix

0 commit comments

Comments
 (0)