forked from ansible-collections/community.zabbix
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (78 loc) · 2.67 KB
/
agent.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
name: "community.zabbix.zabbix_agent"
on:
push:
paths:
- 'roles/zabbix_agent/**'
- 'molecule/zabbix_agent/**'
- 'molecule/requirements.txt'
- '.github/workflows/agent.yml'
pull_request:
paths:
- 'roles/zabbix_agent/**'
- 'molecule/zabbix_agent/**'
- 'molecule/requirements.txt'
- '.github/workflows/agent.yml'
jobs:
molecule:
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
molecule_distro:
- container: centos
image: geerlingguy/docker-centos8-ansible:latest
group: agent
- container: centos2
image: geerlingguy/docker-centos8-ansible:latest
group: agent2
- container: centos
image: geerlingguy/docker-centos7-ansible:latest
group: agent
- container: fedora32
image: geerlingguy/docker-fedora32-ansible:latest
group: agent
- container: ubuntu
image: geerlingguy/docker-ubuntu2004-ansible
group: agent
- container: pgsql-ubuntu
image: geerlingguy/docker-ubuntu1804-ansible
group: agent
- container: debian
image: geerlingguy/docker-debian10-ansible
group: agent
- container: debian
image: geerlingguy/docker-debian9-ansible
group: agent
- container: debian
image: geerlingguy/docker-debian8-ansible
group: agent
- container: mint
image: wdijkerman/mint19.3-amd64
command: /sbin/init
group: agent
collection_role:
- zabbix_agent
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r molecule/requirements.txt
- name: Build the collection
run: |
collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}'))
echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV
- name: Install the collection
run: ansible-galaxy collection install $COLLECTION_FILE
- name: Run role tests
run: >-
MY_MOLECULE_CONTAINER=${{ matrix.molecule_distro.container }}
MY_MOLECULE_IMAGE=${{ matrix.molecule_distro.image }}
MY_MOLECULE_GROUP=${{ matrix.molecule_distro.group }}
MY_MOLECULE_DOCKER_COMMAND=${{ matrix.molecule_distro.command }}
molecule test -s ${{ matrix.collection_role }}