Skip to content

Commit

Permalink
Update test_changed_notebooks.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
robbibt authored Jul 9, 2024
1 parent 66fb08d commit 908b925
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/test_changed_notebooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,40 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
path: dea-notebooks

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-nbval jupyter
- name: Get changed notebook files
id: changed-notebooks
uses: tj-actions/changed-files@v44
with:
files: '**/*.ipynb'

separator: ' '

- name: Print changed notebook files
if: steps.changed-notebooks.outputs.any_changed == 'true'
run: |
echo "Changed notebook files:"
echo "${{ steps.changed-notebooks.outputs.all_changed_files }}"
- name: Get changed Python files
id: changed-py-files
uses: tj-actions/changed-files@v44
with:
files: '**/*.py'

- name: Run pytest on changed notebooks
if: steps.changed-notebooks.outputs.any_changed == 'true'
run: |
pytest --nbval-lax ${{ steps.changed-notebooks.outputs.all_changed_files }}
- name: Run pytest on Python files
separator: ' '

- name: Print changed Python files
if: steps.changed-py-files.outputs.any_changed == 'true'
run: |
pytest Tests/dea_tools
echo "Changed Python files:"
echo "${{ steps.changed-py-files.outputs.all_changed_files }}"
# - name: Run pytest on Python files
# if: steps.changed-py-files.outputs.any_changed == 'true'
# run: |
# pytest Tests/dea_tools

0 comments on commit 908b925

Please sign in to comment.