-
Notifications
You must be signed in to change notification settings - Fork 284
92 lines (83 loc) · 3.28 KB
/
plugins-integration.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
---
name: plugins-integration
on:
push:
paths:
- "plugins/**"
- "tests/integration/**"
- ".github/workflows/plugins-integration.yml"
pull_request:
paths:
- "plugins/**"
- "tests/integration/**"
- ".github/workflows/plugins-integration.yml"
jobs:
integration:
runs-on: ubuntu-latest
name: I (${{ matrix.zabbix_container.version}} Ⓐ${{ matrix.ansible }}+py${{ matrix.python }}})
strategy:
fail-fast: false
matrix:
zabbix_container:
- version: "6.0"
- version: "6.4"
- version: "7.0"
ansible:
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-changelogs
- stable-2.15
- stable-2.16
- stable-2.17
- devel
python:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
exclude:
- ansible: stable-2.15
python: '3.12'
- ansible: stable-2.16
python: '3.9'
- ansible: stable-2.17
python: '3.9'
- ansible: devel
python: '3.9'
- ansible: devel
python: '3.10'
steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/community/zabbix
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install ansible-base (${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
- name: Install ansible.netcommon collection
run: ansible-galaxy collection install ansible.netcommon -p $GITHUB_WORKSPACE
working-directory: ./ansible_collections/community/zabbix
# For Zabbix integration tests we need to test against different versions of
# the Zabbix server. To do this we spin up a Docker container using the `matrix`
# of version and ports specified earlier.
- name: Zabbix container server provisioning
uses: hoverkraft-tech/[email protected]
with:
compose-file: "./ansible_collections/community/zabbix/docker-compose.yml"
env:
zabbix_version: ${{ matrix.zabbix_container.version }}
# Run the integration tests
# As we need to connect to an existing docker container we can't use `--docker` here as the VMs would be on different
# (non-routing) networks, so we run them locally and ensure any required dependencies are installed via `--requirements`
- name: Run integration test
run: ansible-test integration -v --color --continue-on-error --diff --python ${{ matrix.python }} --requirements --coverage
working-directory: ./ansible_collections/community/zabbix
# ansible-test support producing code coverage date
- name: Generate coverage report
run: ansible-test coverage xml -v --requirements --group-by command --group-by version
working-directory: ./ansible_collections/community/zabbix
# See the repots at https://codecov.io/gh/ansible-collections/community.zabbix
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false