diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 25dc8682..fb74cb66 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -1,4 +1,4 @@ -name: tests +name: Test (and Deploy to PyPI on tag) on: # Only run on pushes to main, or when version tags are pushed @@ -22,6 +22,7 @@ concurrency: jobs: linting: runs-on: ubuntu-latest + name: Check Linting steps: - uses: neuroinformatics-unit/actions/lint@v2 @@ -65,6 +66,30 @@ jobs: python-version: ${{ matrix.python-version }} use-xvfb: true + test_numba_disabled: + needs: [linting, manifest] + name: Run tests with numba disabled + runs-on: ubuntu-latest + env: + NUMBA_DISABLE_JIT: "1" + + steps: + - name: Cache tensorflow model + uses: actions/cache@v3 + with: + path: "~/.cellfinder" + key: models-${{ hashFiles('~/.cellfinder/**') }} + # Setup pyqt libraries + - name: Setup qtpy libraries + uses: tlambert03/setup-qt-libs@v1 + # Setup VTK with headless display + - uses: pyvista/setup-headless-display-action@v2 + # Run test suite with numba disabled + - uses: neuroinformatics-unit/actions/test@v2 + with: + python-version: "3.10" + codecov-flags: "numba" + # Run brainglobe-workflows brainmapper-CLI tests to check for # breakages # test_brainmapper_cli: @@ -102,7 +127,7 @@ jobs: build_sdist_wheel: name: Build source distribution and wheel - # needs: [test, test_brainmapper_cli] + # needs: [test, test_brainmapper_cli, test_numba_disabled] needs: [test] if: github.event_name == 'push' && github.ref_type == 'tag' runs-on: ubuntu-latest diff --git a/.github/workflows/test_numba_off.yml b/.github/workflows/test_numba_off.yml deleted file mode 100644 index 48e5f903..00000000 --- a/.github/workflows/test_numba_off.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Test with numba turned off -# These tests are relatively slow (~20 minutes), but are used -# to collect code coverage on areas of code that are otherwise -# optimised by numba. - -on: - push: - branches: [ main ] - - -jobs: - test_numba_disabled: - name: Run tests - runs-on: ubuntu-latest - env: - NUMBA_DISABLE_JIT: "1" - - steps: - - name: Cache tensorflow model - uses: actions/cache@v3 - with: - path: "~/.cellfinder" - key: models-${{ hashFiles('~/.cellfinder/**') }} - - uses: neuroinformatics-unit/actions/test@v2 - with: - python-version: "3.10" - codecov-flags: "numba"