Skip to content

[RHINENG-12446] Enabling default RHSM convert2rhel repos #459

[RHINENG-12446] Enabling default RHSM convert2rhel repos

[RHINENG-12446] Enabling default RHSM convert2rhel repos #459

Workflow file for this run

name: test_coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
coverage:
name: coverage-${{ matrix.el.distro }}${{ matrix.el.ver }}
strategy:
fail-fast: false
matrix:
el:
- distro: centos
ver: 7
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run pytest coverage
run: |
make tests${{ matrix.el.ver }} PYTEST_ARGS="--cov --cov-report xml --cov-report term" KEEP_TEST_CONTAINER=1 BUILD_IMAGES=0
podman cp pytest-container:/data/coverage.xml .
- name: Upload coverage to Codecov
id: UploadFirstAttempt
continue-on-error: true
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
env_vars: OS,PYTHON
flags: ${{ matrix.el.distro }}-linux-${{ matrix.el.ver }}
name: coverage-${{ matrix.el.distro }}
fail_ci_if_error: true
files: ./coverage.xml
verbose: true # optional (default = false)