Skip to content

Commit

Permalink
Merge pull request #439 from MannLabs/also-run-slow-tests
Browse files Browse the repository at this point in the history
run also slow tests
  • Loading branch information
mschwoer authored Jan 17, 2025
2 parents 6f3aa09 + 4d36da2 commit 0f64c9a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/fdr_performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pip_installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
17 changes: 12 additions & 5 deletions tests/run_unit_tests.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0f64c9a

Please sign in to comment.