Skip to content

Commit

Permalink
Merge branch '34-github-actions-pytest-fails' into tutorials_DC3
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneVoss committed Jun 28, 2024
2 parents 512a0a6 + 48d39a3 commit 523a30e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ jobs:
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
# Install same requirements as to be used during regression testing
source $CONDA/etc/profile.d/conda.sh
conda activate
conda create -n my_env python=${{ matrix.python-version }}
conda activate my_env
conda install -y -c conda-forge --file ./tests/list_of_packages.txt || true
# Install with -e (in editable mode) to allow the tracking of the test coverage
pip install -e .[extras,test]
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/coding-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ jobs:
run: |
# Install same requirements as to be used during regression testing
source $CONDA/etc/profile.d/conda.sh
conda activate
conda create -n pylint_env python=${{ matrix.python-version }}
conda activate pylint_env
conda install -y -c conda-forge --file ./tests/list_of_packages.txt || true
# Install the package itself to make sure that all imports work.
pip install .[extras]
- name: Analysing the code with pylint
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate
conda activate pylint_env
pylint $(git ls-files '*.py') --fail-under=7.0
7 changes: 4 additions & 3 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ jobs:
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
# Install same requirements as to be used during regression testing
source $CONDA/etc/profile.d/conda.sh
conda activate
conda create -n pytest_env python=${{ matrix.python-version }}
conda activate pytest_env
conda install -y -c conda-forge --file ./tests/list_of_packages.txt || true
# Install the package itself to make sure that all imports work.
pip install -e .[extras]
pip install -e .[extras,test]
- name: Analysing the code with pytest
run: |
source $CONDA/etc/profile.d/conda.sh
conda activate
conda activate pytest_env
# Run the actual testing of the code with pytest
# Using python -m pytest is necessary because pytest has the habit of not looking in the site-packages of the venv
python -m pytest -v --basetemp=./tmp -k 'test_unittests or test_gui' --cov=loadskernel --cov=modelviewer --cov=loadscompare --junitxml=testresult.xml
Expand Down
1 change: 1 addition & 0 deletions tests/list_of_packages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jupyter
# Regression tests
pytest
pytest-cov
sqlite
jupyter-book

# Coding style
Expand Down

0 comments on commit 523a30e

Please sign in to comment.