build #163
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: 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 |