-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 1.9 KB
/
tests.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
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
tests:
runs-on: ubuntu-20.04
strategy:
matrix:
zabbix-server-versions: [
'5.0',
'5.2',
]
env:
ANSIBLE_CONFIG: .github/workflows/ansible.cfg
name: test-zabbix-${{ matrix.zabbix-server-versions }}
steps:
- name: show operating system information
run: lsb_release -a
- name: shutdown ubuntu default mysqld
run: sudo systemctl stop mysql.service
- name: set up mariadb
uses: getong/[email protected]
with:
host port: 3306
container port: 3306
character set server: 'utf8mb4'
collation server: 'utf8mb4_general_ci'
mariadb version: '10.5'
- uses: actions/checkout@v2
- name: set up python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: install ansible
run: sudo pip3 install wheel && sudo pip3 install -r .github/workflows/requirements.txt
- name: install required ansible collections
run: sudo ansible-galaxy collection install community.zabbix
- name: show python version
run: sudo python3 --version
- name: show ansible version
run: sudo ansible --version
- name: setup zabbix server using ansible
uses: dawidd6/action-ansible-playbook@v2
with:
inventory: localhost
playbook: .github/workflows/ansible-playbook-configure-zabbix-server.yml
options: -e "zabbix_server_version=${{ matrix.zabbix-server-versions }}"
- name: show zabbix server version
run: sudo zabbix_server --version
- name: import template to zabbix server using ansible
uses: dawidd6/action-ansible-playbook@v2
with:
inventory: localhost
playbook: .github/workflows/ansible-playbook-import-template.yml