Rely on obsah to pull in Ansible #532
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' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
container: ${{ matrix.container }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python: | |
- "3.6" | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
include: | |
- python: "2.7" | |
container: "python:2.7" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
if: matrix.container == null | |
- name: Install sudo | |
run: apt-get update && apt-get install -y sudo debian-archive-keyring | |
if: matrix.container != null | |
- name: Install git and git-annex from backports | |
run: | | |
echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list | |
apt-get update && apt-get install -y git/buster-backports git-annex/buster-backports | |
if: matrix.container != null | |
- name: Install dependencies | |
run: pip install -r requirements-test.txt | |
- name: Install RPM tools | |
run : | | |
sudo curl --create-dirs -o /usr/local/bin/spectool https://pagure.io/rpmdevtools/raw/26a8abc746fba9c0b32eb899b96c92841a37855a/f/spectool.in | |
sudo curl --create-dirs -o /usr/local/bin/rpmdev-bumpspec https://pagure.io/rpmdevtools/raw/6f387c1deaa5cbed770310e288abde04b17421dc/f/rpmdev-bumpspec | |
sudo curl --create-dirs -o /usr/local/bin/rpmdev-packager https://pagure.io/rpmdevtools/raw/main/f/rpmdev-packager | |
sudo chmod +x /usr/local/bin/* | |
sudo apt-get update && sudo apt-get install -y git-annex rpm | |
- name: Run tests | |
run: tox | |
container: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run container tests | |
run: docker build --build-arg REPO=${GITHUB_REPOSITORY} --build-arg VERSION=${GITHUB_REF} -t quay.io/foreman/obal:$(echo ${GITHUB_REF} | tr '/' '_') . | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: pip install tox | |
- name: Run tests | |
run: tox -e ansible-lint |