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 93eea60
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 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
23 changes: 17 additions & 6 deletions .github/workflows/test-notebooks.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
name: "Test notebooks"

on: [push, workflow_dispatch]

concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}
cancel-in-progress: true
on: [pull_request, workflow_dispatch]

jobs:
tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- 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 == 'pull_request' }}; then
echo "changed_files=$(git diff --name-only HEAD^ HEAD | 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 93eea60

Please sign in to comment.