Debian Codegraph @

ansible_collections/community/zabbix/.github/workflows/web.yml

raw
1 ---
2 name: "community.zabbix.zabbix_web"
3 on:
4 push:
5 paths:
6 - "roles/zabbix_web/**"
7 - "molecule/zabbix_web/**"
8 - "molecule/requirements.txt"
9 - ".github/workflows/web.yml"
10 - "roles/zabbix_repo/**"
11 pull_request:
12 paths:
13 - "roles/zabbix_web/**"
14 - "molecule/zabbix_web/**"
15 - "molecule/requirements.txt"
16 - ".github/workflows/web.yml"
17 - "roles/zabbix_repo/**"
18 jobs:
19 molecule:
20 runs-on: ubuntu-22.04
21 strategy:
22 fail-fast: false
23 matrix:
24 container:
25 - image: rockylinux10
26 - image: rockylinux9
27 - image: rockylinux8
28 ansible_core: ansible-core<2.17
29 - image: ubuntu2404
30 - image: ubuntu2204
31 - image: debian12
32 - image: debian11
33 collection_role:
34 - zabbix_web
35 database:
36 - mysql
37 - pgsql
38 web_server:
39 - nginx
40 - apache
41 version:
42 - v74
43 - v72
44 - v70
45 - v60
46 exclude:
47 - container:
48 image: rockylinux10
49 version: v72
50 - container:
51 image: rockylinux10
52 version: v70
53 - container:
54 image: rockylinux10
55 version: v60
56 - container:
57 image: debian11
58 version: v74
59 - container:
60 image: debian11
61 version: v72
62 - container:
63 image: debian11
64 version: v70
65 steps:
66 - name: Check out code
67 uses: actions/checkout@v6
68
69 - name: Set up Python 3.11
70 uses: actions/setup-python@v6
71 with:
72 python-version: 3.11
73
74 - name: Install latest pip
75 run: python -m pip install --upgrade pip
76
77 - name: Install specific version ansible-core
78 if: matrix.container.ansible_core != null
79 run: pip install "${{ matrix.container.ansible_core }}"
80
81 - name: Install dependencies
82 run: pip install -r molecule/requirements.txt
83
84 - name: Build the collection
85 run: |
86 # Pin versions to speed up CI
87 sed -i 's/ansible\.windows:\s*"\*"/ansible.windows: "2.8.0"/' galaxy.yml
88 sed -i 's/ansible\.netcommon:\s*"\*"/ansible.netcommon: "7.2.0"/' galaxy.yml
89 sed -i 's/ansible\.posix:\s*"\*"/ansible.posix: "2.0.0"/' galaxy.yml
90 sed -i 's/community\.general:\s*"\*"/community.general: "10.5.0"/' galaxy.yml
91 sed -i 's/community\.mysql:\s*"\*"/community.mysql: "3.13.0"/' galaxy.yml
92 sed -i 's/community\.postgresql:\s*"\*"/community.postgresql: "3.12.0"/' galaxy.yml
93
94 collection_file=$( basename $(ansible-galaxy collection build -f | awk -F" " '{print $NF}'))
95 echo "COLLECTION_FILE=$collection_file" >> $GITHUB_ENV
96
97 - name: Install the collection
98 run: ansible-galaxy collection install -vvvv $COLLECTION_FILE
99
100 - name: Run role tests
101 run: >-
102 MY_MOLECULE_CONTAINER=${{ matrix.container.image }}
103 MY_MOLECULE_IMAGE=${{ matrix.container.image }}
104 MY_MOLECULE_VERSION=${{ matrix.version }}
105 MY_MOLECULE_DATABASE=${{ matrix.database }}
106 MY_MOLECULE_WEB_SERVER=${{ matrix.web_server }}
107 MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }}
108 molecule test -s ${{ matrix.collection_role }}