Skip to content

CI

CI #167

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 14 * * *"
defaults:
run:
working-directory: "RossLopez/ansible-role-docker"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies.
run: pip3 install yamllint ansible ansible-lint molecule molecule-plugins[docker] docker
- name: Lint code.
run: |
yamllint .
ansible-lint
molecule:
name: Molecule test
runs-on: ubuntu-latest
strategy:
matrix:
distro: [rockylinux9, rockylinux8, ubuntu2204, ubuntu2404, debian12, debian11]
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Set up Python 3.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies.
run: pip3 install yamllint ansible ansible-lint molecule molecule-plugins[docker] docker
- name: Run Molecule tests.
run: |
molecule test
env:
MOLECULE_DISTRO: ${{ matrix.distro }}