Add to content_view_version versions asynchronical with a poll interval #3428
Workflow file for this run
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: CI | |
on: [push, pull_request] | |
env: | |
COLORTERM: 'yes' | |
TERM: 'xterm-256color' | |
PYTEST_ADDOPTS: '--color=yes' | |
concurrency: | |
group: ${{ github.ref_name }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
container: ${{ matrix.container }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python: | |
- "3.10" | |
ansible: | |
- stable-2.12 | |
- stable-2.13 | |
- stable-2.14 | |
- stable-2.15 | |
- stable-2.16 | |
- devel | |
include: | |
- python: "3.8" | |
ansible: "v2.9.17" | |
- python: "3.8" | |
ansible: "stable-2.10" | |
- python: "2.7" | |
ansible: "stable-2.11" | |
container: "python:2.7" | |
- python: "3.5" | |
ansible: "stable-2.11" | |
- python: "3.6" | |
ansible: "stable-2.11" | |
- python: "3.7" | |
ansible: "stable-2.11" | |
- python: "3.9" | |
ansible: "stable-2.11" | |
- python: "3.11" | |
ansible: "devel" | |
- python: "3.12" | |
ansible: "devel" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'pip' | |
cache-dependency-path: '**/requirements*.txt' | |
if: matrix.container == null | |
- name: Install sudo | |
run: apt-get update && apt-get install -y sudo | |
if: matrix.container != null | |
- name: Install system dependencies | |
# libyaml-dev for PyYAML, rpm for rpm-py-installer, python3-rpm for rpm-shim | |
run: sudo apt-get install -y libyaml-dev rpm python3-rpm | |
- name: Fix up Python RPM binding filenames so that other Pythons find it | |
run: | | |
for file in /usr/lib/python3/dist-packages/rpm/_rpm*.cpython-*.so; do | |
sudo ln -s ${file} $(echo ${file} | sed 's/\.cpython[^.]*//'); | |
done | |
if: matrix.container == null | |
- name: Install Ansible | |
run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz | |
- name: Ensure Jinja version is old enough for Ansible 2.9 | |
run: pip install --upgrade 'Jinja2<3.1' | |
if: matrix.ansible == 'v2.9.17' | |
- name: Install dependencies | |
run: make test-setup | |
- name: prepare a redhat-uep.pem, even if we run on Ubuntu | |
run: sudo mkdir -p /etc/rhsm/ca/ && sudo curl -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem | |
- name: Install required collections for ansible-base (2.10+) | |
run: ansible-galaxy collection install community.docker | |
if: matrix.ansible != 'v2.9.17' | |
- name: Run crud tests | |
run: make test-crud | |
- name: Run other tests | |
run: make test-other | |
- name: Run dist tests | |
run: make dist-test | |
- name: Run sanity tests | |
run: make SANITY_OPTS="--docker" sanity | |
if: matrix.ansible != 'v2.9.17' && matrix.ansible != 'stable-2.10' && matrix.ansible != 'stable-2.11' | |
checkmode: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
cache-dependency-path: '**/requirements*.txt' | |
- name: Install system dependencies | |
# libyaml-dev for PyYAML, rpm for rpm-py-installer, python3-rpm for rpm-shim | |
run: sudo apt-get install -y libyaml-dev rpm python3-rpm | |
- name: Fix up Python RPM binding filenames so that other Pythons find it | |
run: | | |
for file in /usr/lib/python3/dist-packages/rpm/_rpm*.cpython-*.so; do | |
sudo ln -s ${file} $(echo ${file} | sed 's/\.cpython[^.]*//'); | |
done | |
- name: Install Ansible | |
run: pip install --upgrade ansible-core | |
- name: Install dependencies | |
run: make test-setup | |
- name: prepare a redhat-uep.pem, even if we run on Ubuntu | |
run: sudo mkdir -p /etc/rhsm/ca/ && sudo curl -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem | |
- name: Run check_mode tests | |
run: make test-check-mode | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: 'pip' | |
cache-dependency-path: '**/requirements*.txt' | |
- name: Install dependencies | |
run: make doc-setup | |
- name: Generate changelog | |
run: antsibull-changelog release | |
- name: Build docs | |
run: make doc | |
- name: Upload docs artifact | |
uses: actions/upload-artifact@v3 | |
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@v4 | |
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@v4 | |
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: Run lint | |
run: make lint | |
- name: Upload collection artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: collection | |
path: theforeman-foreman-*.tar.gz | |
execution_environment: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
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 | |
- name: Test EE | |
run: | | |
ansible-navigator --execution-environment-image test-ee:latest --pull-policy never --mode stdout doc theforeman.foreman.host |