Skip to content

Commit

Permalink
attempt to get files_changed
Browse files Browse the repository at this point in the history
  • Loading branch information
classiqdor committed May 7, 2024
1 parent cef3177 commit b9f7f0f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 2
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/test-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ name: "Test notebooks"

on: [push, workflow_dispatch]

concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -19,5 +17,18 @@ jobs:
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tool.pytest.ini_options]
python_files = "test_*.py"
timeout_method = "thread"

[tool.isort]
profile = "black"
Expand Down

0 comments on commit b9f7f0f

Please sign in to comment.