Skip to content

[RHELC-1760] Make post-conversion analysis summary clearer #8964

[RHELC-1760] Make post-conversion analysis summary clearer

[RHELC-1760] Make post-conversion analysis summary clearer #8964

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
- distro: centos
ver: 8
- distro: centos
ver: 9
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="--override-ini=addopts= --cov --cov-report xml --cov-report term" KEEP_TEST_CONTAINER=1 BUILD_IMAGES=0
podman cp convert2rhel-centos${{ matrix.el.ver }}:/data/coverage.xml .
- name: Upload coverage to Codecov - First Attempt
id: UploadFirstAttempt
continue-on-error: true
uses: codecov/codecov-action@v5
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)
- name: Wait before retrying
if: steps.UploadFirstAttempt.outcome == 'failure'
run: sleep 1m
- name: Upload coverage to Codecov - Second Attempt
id: UploadSecondAttempt
if: steps.UploadFirstAttempt.outcome == 'failure'
uses: codecov/codecov-action@v5
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)