Skip to content

Change consul check logic #10

Change consul check logic

Change consul check logic #10

Workflow file for this run

---
name: libvirt
on:
pull_request:
branches:
- master
paths:
- 'playbooks/prepare.yml'
- 'molecule/update/*.yml'
- 'playbooks/update.yml'
- '.github/workflows/libvirt.yml'
jobs:
version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if galaxy.yml has been modified
run: |
# Get a list of all modified files in this PR
FILES_CHANGED=$(git diff --name-only HEAD^ HEAD)
echo "Files changed: $FILES_CHANGED"
# Check if galaxy.yml is in the list of changed files
if [[ $FILES_CHANGED != *"galaxy.yml"* ]]; then
echo "Error: galaxy.yml has not been modified."
exit 1
fi
libvirt:
name: libvirt
runs-on: libvirt
needs: version
strategy:
matrix:
scenario:
- update
image:
- https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
steps:
- name: Check out the codebase
uses: actions/checkout@v4
- name: Set up python 3
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Update ubuntu repositories
run: sudo apt-get update
- name: Install make
run: sudo apt-get install -y make
- name: Install dependencies
run: make install
- name: Debug test environment
run: make debug
- name: Install role requirements
run: make requirements
- name: Run molecule tests.
run: make test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_KVM_IMAGE: ${{ matrix.image }}
MOLECULE_SCENARIO: ${{ matrix.scenario }}