Skip to content

CI

CI #46

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 5 * * 4"
defaults:
run:
working-directory: "rholmboe.spruce"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
with:
path: "rholmboe.spruce"
- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install test dependencies.
run: |
python3 -m pip install ansible ansible-lint yamllint
- name: Lint code.
run: |
yamllint .
ansible-lint .
molecule:
name: Molecule
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- debian10
- debian11
- debian12
- ubuntu1804
- ubuntu2004
- ubuntu2204
- rockylinux8
- rockylinux9
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
with:
path: "rholmboe.spruce"
- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install test dependencies.
run: |
python3 -m pip install --upgrade setuptools
python3 -m pip install ansible-core ansible-lint
python3 -m pip install molecule "molecule-plugins[docker]"
- name: Run Molecule tests.
run: molecule test
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
MOLECULE_DISTRO: ${{ matrix.distro }}