From b0933d48121b39ba0ace09a081b66c6d924110a1 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Fri, 6 Sep 2024 17:43:28 -0400 Subject: [PATCH] Exercise feature-flag in unit tests --- .github/workflows/python-ci-single.yml | 9 ++++++++- .github/workflows/r-ci.yml | 9 +++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-ci-single.yml b/.github/workflows/python-ci-single.yml index 0c05dd8413..66104372cb 100644 --- a/.github/workflows/python-ci-single.yml +++ b/.github/workflows/python-ci-single.yml @@ -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 diff --git a/.github/workflows/r-ci.yml b/.github/workflows/r-ci.yml index 2eb93d2de2..5a50f47065 100644 --- a/.github/workflows/r-ci.yml +++ b/.github/workflows/r-ci.yml @@ -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