-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (41 loc) · 1.44 KB
/
build.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
name: build
on:
push:
pull_request:
schedule:
- cron: '0 20 * * 2'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8,3.9]
env:
PYTHON_COVREPORTS_VERSION: 3.9
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install lcov
run: |
wget https://github.com/linux-test-project/lcov/releases/download/v1.15/lcov-1.15.tar.gz
tar xf lcov-1.15.tar.gz
sudo make -C lcov-1.15/ install
- name: Install package
run: |
export CFLAGS="-D PARALLEL_SERIAL_SORT_SWITCH=10 -D PARALLEL_SERIAL_MERGE_SWITCH=10 -D PARALLEL_SORT_NUM_THREADS=2"
python setup.py build_ext --coverage --inplace
python setup.py develop
- name: Test with pytest
run: |
pip install pytest-cov
pytest -v tests/ --cov wendy --cov-config .coveragerc --cov-report=term --cov-report=xml
- name: Generate code coverage
if: ${{ matrix.python-version == env.PYTHON_COVREPORTS_VERSION }}
run: |
lcov --capture --base-directory . --directory build/temp.linux-x86_64-3.9/wendy/ --no-external --output-file coverage_full.info
- name: Upload coverage reports to codecov
if: ${{ matrix.python-version == env.PYTHON_COVREPORTS_VERSION }}
uses: codecov/codecov-action@v3