This repository has been archived by the owner on Jan 15, 2024. It is now read-only.
Renovate: ansible-community/ansible-lint to v6.21.1 (#9) #39
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: Molecule Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
working-directory: "mirsg.install_python" | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the codebase | |
uses: actions/checkout@v3 | |
with: | |
path: "mirsg.install_python" | |
- name: Set up Python 3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install lint dependencies | |
run: pip3 install yamllint | |
- name: Lint code | |
run: | | |
yamllint . | |
molecule: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
molecule_docker_image: | |
- rockylinux:8 | |
- geerlingguy/docker-centos7-ansible:latest | |
- geerlingguy/docker-ubuntu2204-ansible:latest | |
molecule_docker_command: | |
- /usr/sbin/init | |
exclude: | |
- molecule_docker_image: geerlingguy/docker-ubuntu2204-ansible:latest | |
molecule_docker_command: /usr/sbin/init | |
include: | |
- molecule_docker_image: geerlingguy/docker-ubuntu2204-ansible:latest | |
molecule_docker_command: /lib/systemd/systemd | |
steps: | |
- name: Check out the codebase | |
uses: actions/checkout@v3 | |
with: | |
path: "mirsg.install_python" | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install test dependencies | |
run: | | |
sudo apt-get update && sudo apt-get -y install rsync | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r requirements.txt | |
- name: Test with molecule | |
run: | | |
molecule test | |
env: | |
PY_COLORS: "1" | |
ANSIBLE_FORCE_COLOR: "1" | |
MOLECULE_DOCKER_IMAGE: ${{ matrix.molecule_docker_image }} | |
MOLECULE_DOCKER_COMMAND: ${{ matrix.molecule_docker_command }} |