Skip to content

Commit

Permalink
Initial GH workflow for running cpython tests
Browse files Browse the repository at this point in the history
Add coverage output

Reduce dependencies

add numpy
  • Loading branch information
jeromekelleher committed Jul 15, 2024
1 parent 5afff95 commit a35100d
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,33 @@ jobs:
cd tests
python -m vcztools --help
c_python_test:
name: CPython interface tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install system dependencies
run: |
sudo apt install -y gcovr
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install numpy pytest
- name: Build module with coverage
run: |
# Build the extension module in-place so pytest can find it
CFLAGS="--coverage" python3 setup.py build_ext --inplace
- name: Run tests
run: |
pytest -vs tests/test_cpython_interface.py
- name: Show coverage
run: |
gcovr --filter vcztools
c_test:
name: C tests
runs-on: ubuntu-latest
Expand All @@ -88,7 +115,7 @@ jobs:
run: |
ninja -C build coverage-text
cat build/meson-logs/coverage.txt
- name: Valgrind
- name: Valgrind
working-directory: ./lib
run: |
valgrind --leak-check=full --error-exitcode=1 ./build/tests

0 comments on commit a35100d

Please sign in to comment.