3.2.0 prep (#1421) #869
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "community.zabbix.zabbix_agent" | |
on: | |
push: | |
paths: | |
- "roles/zabbix_agent/**" | |
- "molecule/zabbix_agent/**" | |
- "molecule/requirements.txt" | |
- ".github/workflows/agent.yml" | |
- "roles/zabbix_repo/**" | |
- "molecule/zabbix_repo/**" | |
- ".github/workflows/repo.yml" | |
pull_request: | |
paths: | |
- "roles/zabbix_agent/**" | |
- "molecule/zabbix_agent/**" | |
- "molecule/requirements.txt" | |
- ".github/workflows/agent.yml" | |
- "roles/zabbix_repo/**" | |
- "molecule/zabbix_repo/**" | |
- ".github/workflows/repo.yml" | |
jobs: | |
molecule: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
- rockylinux9 | |
- rockylinux8 | |
- ubuntu2404 | |
- ubuntu2204 | |
- ubuntu2004 | |
- debian12 | |
- debian11 | |
- opensuseleap15 | |
version: | |
- v70 | |
- v64 | |
- v60 | |
scenario_name: | |
- default | |
- autopsk | |
- agent2 | |
- agent2autopsk | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r molecule/requirements.txt | |
- name: Build the collection | |
run: | | |
# Pin versions to speed up CI | |
sed -i 's/ansible\.windows:\s*"\*"/ansible.windows: "2.3.0"/' galaxy.yml | |
sed -i 's/ansible\.netcommon:\s*"\*"/ansible.netcommon: "6.1.1"/' galaxy.yml | |
sed -i 's/ansible\.posix:\s*"\*"/ansible.posix: "1.5.4"/' galaxy.yml | |
sed -i 's/community\.general:\s*"\*"/community.general: "8.6.0"/' galaxy.yml | |
sed -i 's/community\.mysql:\s*"\*"/community.mysql: "3.9.0"/' galaxy.yml | |
sed -i 's/community\.postgresql:\s*"\*"/community.postgresql: "3.4.0"/' galaxy.yml | |
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 -vvvv $COLLECTION_FILE | |
- name: Run role tests | |
working-directory: molecule/zabbix_agent_tests | |
run: >- | |
MY_MOLECULE_CONTAINER=${{ matrix.container }} | |
MY_MOLECULE_IMAGE=${{ matrix.container }} | |
MY_MOLECULE_VERSION=${{ matrix.version }} | |
MY_MOLECULE_DOCKER_COMMAND=${{ matrix.command }} | |
molecule -c common/molecule.yml test -s ${{ matrix.scenario_name }} |