Skip to content

update build status badge to GHA #478

update build status badge to GHA

update build status badge to GHA #478

Workflow file for this run

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"
- "3.13"
env:
PYTHON: ${{ matrix.python }}
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
if: matrix.container != null
- 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 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 dependencies
run: pip install tox tox-gh-actions
- name: Run tests
run: tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.0.2
with:
env_vars: PYTHON
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}