Skip to content

attempt to get files_changed #15

attempt to get files_changed

attempt to get files_changed #15

name: "Test notebooks"
on: [push, workflow_dispatch]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: 'Install dependencies'
run: |
python -m pip install -U -r requirements.txt
python -m pip install -U pytest
- name: Get changed files
id: changed-files
run: |
if ${{ github.event_name == 'push' }}; then
echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
fi
- name: List changed files
run: |
for file in ${{ steps.changed-files.outputs.changed_files }}; do
echo "$file was changed"
done
- name: 'Run tests'
run: python -m pytest tests