Skip to content

Commit

Permalink
Exercise feature-flag in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Sep 6, 2024
1 parent 0c0c24e commit b0933d4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/python-ci-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,20 @@ jobs:
env:
TILEDB_SOMA_INIT_BUFFER_BYTES: 33554432 # accommodate tiny runners

- name: Run pytests for Python
- name: Run pytests for Python without new shape
shell: bash
# Setting PYTHONPATH ensures the tests load the in-tree source code under apis/python/src
# instead of the copy we `pip install`ed to site-packages above. That's needed for the code
# coverage analysis to work.
run: PYTHONPATH=$(pwd)/apis/python/src python -m pytest --cov=apis/python/src --cov-report=xml apis/python/tests -v --durations=20

- name: Run pytests for Python with new shape
shell: bash
# Setting PYTHONPATH ensures the tests load the in-tree source code under apis/python/src
# instead of the copy we `pip install`ed to site-packages above. That's needed for the code
# coverage analysis to work.
run: export SOMA_PY_NEW_SHAPE=true; PYTHONPATH=$(pwd)/apis/python/src python -m pytest --cov=apis/python/src --cov-report=xml apis/python/tests -v --durations=20

- name: Report coverage to Codecov
if: inputs.report_codecov
uses: codecov/codecov-action@v4
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/r-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,15 @@ jobs:
# -e "devtools::install(upgrade = FALSE)" \
# -e "testthat::test_local('tests/testthat', load_package = 'installed')"

- name: Test
- name: Test without new shape
if: ${{ matrix.covr == 'no' }}
run: cd apis/r/tests && Rscript testthat.R


# https://github.com/single-cell-data/TileDB-SOMA/issues/2407
- name: Test with new shape
if: ${{ matrix.covr == 'no' }}
run: export SOMA_R_NEW_SHAPE=true && cd apis/r/tests && Rscript testthat.R

- name: Coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.covr == 'yes' && github.event_name == 'workflow_dispatch' }}
run: apis/r/tools/r-ci.sh coverage
Expand Down

0 comments on commit b0933d4

Please sign in to comment.