forked from oamg/convert2rhel
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.28 KB
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: test_coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
coverage:
name: coverage-centos${{ matrix.centos_ver }}
strategy:
matrix:
centos_ver: [7, 8]
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # 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.centos_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@v3
with:
env_vars: OS,PYTHON
flags: centos-linux-${{ matrix.centos_ver }}
name: coverage-centos
fail_ci_if_error: true
files: ./coverage.xml
verbose: true # optional (default = false)