Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
name: Python-C tests
uses: tskit-dev/.github/.github/workflows/python-c-tests.yml@main
with:
tests: python/tests/test_python_c.py python/tests/test_dict_encoding.py
pyproject-directory: python
secrets: inherit

Expand Down Expand Up @@ -75,15 +76,7 @@ jobs:

- name: Install dependencies
working-directory: python
run: |
uv sync --locked --group test
# Remove tskit installed as a dep of msprime
uv pip uninstall tskit

- name: Build module
working-directory: python
run: |
uv run python setup.py build_ext --inplace
run: uv sync --locked --group test

- name: Minidom test
working-directory: python
Expand All @@ -93,37 +86,40 @@ jobs:
uv run python -c "import tskit;tskit.Tree.generate_star(5).tree_sequence.draw_svg(path='test.svg')"

- name: Run JIT code coverage
working-directory: python
run: |
NUMBA_DISABLE_JIT=1 uv run pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 tests/test_jit.py
NUMBA_DISABLE_JIT=1 uv run --project=python \
pytest --cov=tskit --cov-report=xml --cov-branch -n2 \
python/tests/test_jit.py

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: python
fail_ci_if_error: false
flags: python-tests-no-jit
name: codecov-umbrella
files: coverage.xml
disable_search: true
verbose: true
flags: python-tests-no-jit

- name: Run tests
working-directory: python
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
uv run pytest -x --skip-slow --cov=tskit --cov-report=xml --cov-branch -n2 --durations=20 tests
uv run --project=python \
pytest --cov=tskit --skip-slow --cov-report=xml --cov-branch -n2 python/tests
else
uv run pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 --durations=20 tests
uv run --project=python \
pytest --cov=tskit --cov-report=xml --cov-branch -n2 python/tests
fi

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: python
fail_ci_if_error: false
flags: python-tests
gcov_args: --preserve-paths
files: coverage.xml
disable_search: true
verbose: true

msys2:
Expand Down
10 changes: 8 additions & 2 deletions .codecov.yml → codecov.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# ignore:
# - "lib/tests/"
# - "lib/dev-tools/"
# - "lib/avl.c"
# - "lib/subprojects/**/*"

codecov:
require_ci_to_pass: false

comment:
layout: "header, diff, flags, components" # show component info in the PR comment

# fixes:
# - "tskit/::python/tskit/"
# - "^_tskitmodule.*::python/_tskitmodule.*"

component_management:
individual_components:
- component_id: python_code
Expand All @@ -18,6 +23,7 @@ component_management:
name: Python C interface
paths:
- python/_tskitmodule.c
- python/lwt_interface/tskit_lwt_interface.h

- component_id: c_code
name: C library
Expand Down