Skip to content

CI

CI #477

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 6 * * *'
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
PYTEST_ADDOPTS: '--color=yes'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python:
- "3.11"
ansible:
- stable-2.14
- stable-2.15
- stable-2.16
- devel
include:
- python: "3.10"
ansible: "stable-2.14"
- python: "3.12"
ansible: "devel"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install libyaml-dev for PyYAML
run: sudo apt-get install -y libyaml-dev
- name: Install Ansible
run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz
- name: Install dependencies
run: make test-setup
- name: Run sanity tests
run: make SANITY_OPTS="--local" sanity
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: make doc-setup
- name: Build docs
run: make doc
- name: Upload docs artifact
uses: actions/upload-artifact@v4
with:
name: docs-html
path: docs/_build/html/
galaxy-importer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: pip install --upgrade py galaxy-importer
- name: Run galaxy-importer
run: make galaxy-importer
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: |
pip install --upgrade ansible-core
pip install --upgrade -r requirements-lint.txt
- name: Install required collections for linting
run: ansible-galaxy collection install theforeman.operations
- name: Run lint
run: make lint
- name: Upload collection artifact
uses: actions/upload-artifact@v4
with:
name: collection
path: redhat-satellite_operations-*.tar.gz
molecule:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python:
- "3.11"
ansible:
- stable-2.14
- stable-2.15
- stable-2.16
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Ansible
run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz
- name: Install dependencies
run: make test-setup
- name: Run tests
env:
DRIVER_NAME: docker
run: ./tests/molecule.sh
execution_environment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: pip install --upgrade ansible-core ansible-builder ansible-navigator
- name: Build EE
run: ansible-builder build -v 3 -t test-ee:latest -f meta/execution-environment.yml