Skip to content

Commit

Permalink
Merge pull request #192 from bsipocz/CI_enhancements
Browse files Browse the repository at this point in the history
CI: various enhancements to how we test
  • Loading branch information
bsipocz authored Dec 17, 2024
2 parents 3eb1917 + def443d commit aa20d77
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci_tests_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,21 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
- name: Setup conda environment with notebook dependencies
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment.yml
activate-environment: navo-env
auto-activate-base: false
- run: pip install -r doc-requirements.txt
- run: |
conda-remove-defaults: true
- name: Install testing dependencies
run: pip install -r doc-requirements.txt pytest-custom_exit_code
- name: Execute notebooks as testing
run: |
python check_env.py
bash -c 'find content -name "*.md" | xargs jupytext --to notebook '
pytest --nbval content/
pytest --nbval --suppress-tests-failed-exit-code content/
pytest --nbval --last-failed --last-failed-no-failures none --suppress-no-test-exit-code content/
publish:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
Expand Down
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ deps =
oldestdeps: scipy==1.6
# Temporary fix for lexer errors
ipython!=8.7.0
!buildhtml: pytest-custom_exit_code

allowlist_externals = bash

commands =
pip freeze
!buildhtml: bash -c 'find content -name "*.md" | xargs jupytext --to notebook '

!buildhtml: pytest --nbval content/
# We rerun the failed tests hoping that it filters out some flaky server behaviour
!buildhtml: pytest --nbval --suppress-tests-failed-exit-code content/
!buildhtml: pytest --nbval --last-failed --last-failed-no-failures none --suppress-no-test-exit-code content/
buildhtml: sphinx-build -b html . _build/html -D nb_execution_mode=auto -nWT --keep-going

pip_pre =
Expand Down

0 comments on commit aa20d77

Please sign in to comment.