[RHELC-1393] Move logger initialization to initialize module (#1095) #107
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: 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="--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 | |
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) |