-
Notifications
You must be signed in to change notification settings - Fork 167
58 lines (50 loc) · 1.41 KB
/
run_cvg.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
47
48
49
50
51
52
53
54
55
56
57
58
name: C and Python coverage
on:
push:
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [develop]
types: [opened]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:
inputs:
reason:
description: 'Reason for running workflow'
required: true
jobs:
coverage:
runs-on: 'ubuntu-latest'
steps:
- name: Log reason (manual run only)
if: github.event_name == 'workflow_dispatch'
run: |
echo "Reason for triggering: ${{ github.event.inputs.reason }}"
- name: Check out
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0 # unshallow fetch for setuptools-scm
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Build AFDKO wheel
env:
CFLAGS: '--coverage -I/usr/include/libxml2'
run: |
python -m pip install --upgrade pip
python -m pip install build>=0.7.0
python -m build --wheel
- name: Install AFDKO wheel
run: |
python -m pip install dist/*.whl -q
- name: Generate Python and C coverage
run: |
python -m pip install pytest-cov -q
python -m pytest tests --cov --cov-report=xml --color=yes
- name: Upload coverage results
run: |
bash <(curl -s https://codecov.io/bash) -y .codecov.yml