Skip to content

Commit

Permalink
testing action to only run modified notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
betolink committed Jun 8, 2023
1 parent 732e3a3 commit 5ea45c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Install Conda environment with Micromamba"
uses: mamba-org/provision-with-micromamba@main
with:
Expand All @@ -46,12 +48,19 @@ jobs:
with:
version: 1.1.251

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v36

- name: "Execute notebooks with Quarto"
env:
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
shell: bash -l {0}
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
find notebooks -type f -name "*.ipynb" -not -path '*\.ipynb_checkpoints/*' -not -path '*endered*' | xargs -I F quarto render "F" --execute --execute-daemon
win-osx:
Expand Down
2 changes: 1 addition & 1 deletion notebooks/SnowEx_ASO_MODIS_Snow/Snow-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
"outputs": [],
"source": [
"snowex_path = path / 'SnowEx17_GPR_Version2_Week1.csv' # Define local filepath\n",
"print(snowex_pathg, os.getcwd())\n",
"print(snowex_path, os.getcwd())\n",
"df = pd.read_csv(snowex_path, sep='\\t')\n",
"df.head()"
]
Expand Down

0 comments on commit 5ea45c1

Please sign in to comment.