Skip to content

CI

CI #244

Workflow file for this run

---
name: CI
on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 5 * * 0"
defaults:
run:
working-directory: "gmazoyer.peering_manager"
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: "gmazoyer.peering_manager"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip3 install ansible ansible-lint
- name: Lint code
run: ansible-lint -p .
molecule:
name: molecule
runs-on: ubuntu-latest
strategy:
matrix:
distro:
- debian11
- debian12
- ubuntu2004
- ubuntu2204
steps:
- uses: actions/checkout@v4
with:
path: "gmazoyer.peering_manager"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip3 install ansible molecule molecule-plugins[docker] docker
- name: Run Molecule
run: molecule test
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
MOLECULE_DISTRO: ${{ matrix.distro }}
galaxy:
name: galaxy import
runs-on: ubuntu-latest
needs: [lint, molecule]
steps:
- uses: actions/checkout@v4
with:
path: "gmazoyer.peering_manager"
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Ansible
run: |
python -m pip install --upgrade pip wheel
pip3 install ansible
- name: Trigger Galaxy import
run: >-
ansible-galaxy role import
--token ${{ secrets.GALAXY_API_KEY }}
peering-manager ansible-role-peering-manager