diff --git a/.github/workflows/fdr_performance.yml b/.github/workflows/fdr_performance.yml index 6ce844a5..0fbafaea 100644 --- a/.github/workflows/fdr_performance.yml +++ b/.github/workflows/fdr_performance.yml @@ -35,7 +35,7 @@ jobs: shell: bash -l {0} run: | cd misc - . ./pip_install.sh stable,tests alphadia 3.11 True + . ./pip_install.sh stable,tests alphadia 3.11 true - name: Run legacy classifier env: # Or as an environment variable NEPTUNE_API_TOKEN: ${{ secrets.NEPTUNE_FDR_TOKEN }} diff --git a/.github/workflows/pip_installation.yml b/.github/workflows/pip_installation.yml index 66b7fa81..fac121ae 100644 --- a/.github/workflows/pip_installation.yml +++ b/.github/workflows/pip_installation.yml @@ -29,7 +29,7 @@ jobs: python-version: ${{ matrix.python-version }} os: ${{ matrix.os }} install-script: ./pip_install.sh stable,tests - test-script: ./run_unit_tests.sh + test-script: ./run_unit_tests.sh true run-unit-tests-loose: name: Test 'loose' on ${{ matrix.os }} @@ -43,4 +43,4 @@ jobs: python-version: ${{ matrix.python-version }} os: ${{ matrix.os }} install-script: ./pip_install.sh tests - test-script: ./run_unit_tests.sh + test-script: ./run_unit_tests.sh true diff --git a/tests/run_unit_tests.sh b/tests/run_unit_tests.sh index 81ff4727..4236efa2 100755 --- a/tests/run_unit_tests.sh +++ b/tests/run_unit_tests.sh @@ -1,7 +1,14 @@ -conda activate alphadia -#python -m unittest unit_tests/test_cli.py -#python -m unittest unit_tests/test_gui.py -coverage run --source=../alphadia -m pytest -k 'not slow' +#!/bin/bash + +ENV_NAME=alphadia + +INCLUDE_SLOW_TESTS=${1:-false} + +if [ "$INCLUDE_SLOW_TESTS" == "true" ]; then + conda run -n $ENV_NAME --no-capture-output coverage run --source=../alphadia -m pytest +else + conda run -n $ENV_NAME --no-capture-output coverage run --source=../alphadia -m pytest -k 'not slow' +fi + # coverage run --source=../alphadia -m pytest && coverage html && coverage-badge -f -o ../coverage.svg # coverage run --source=../alphadia -m pytest -k 'not slow' && coverage html && coverage-badge -f -o ../coverage.svg -conda deactivate