File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test Modified Files
2+
3+ on :
4+ push :
5+ branches : [ changed_files ]
6+ pull_request :
7+ branches : [ changed_files ]
8+
9+ jobs :
10+ test_files :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+ path : dea-notebooks
18+
19+ # - name: Set up Python
20+ # uses: actions/setup-python@v4
21+ # with:
22+ # python-version: '3.x'
23+
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install pytest pytest-nbval jupyter
28+
29+ - name : Get changed notebook files
30+ id : changed-notebooks
31+ uses : tj-actions/changed-files@v44
32+ with :
33+ files : ' **/*.ipynb'
34+
35+ - name : Get changed Python files
36+ id : changed-py-files
37+ uses : tj-actions/changed-files@v44
38+ with :
39+ files : ' **/*.py'
40+
41+ - name : Run pytest on changed notebooks
42+ if : steps.changed-notebooks.outputs.any_changed == 'true'
43+ run : |
44+ pytest --nbval-lax ${{ steps.changed-notebooks.outputs.all_changed_files }}
45+
46+ - name : Run pytest on Python files
47+ if : steps.changed-py-files.outputs.any_changed == 'true'
48+ run : |
49+ pytest Tests/dea_tools
You can’t perform that action at this time.
0 commit comments