Skip to content

ci: skip tests if unaffected TASK-1316 #9

ci: skip tests if unaffected TASK-1316

ci: skip tests if unaffected TASK-1316 #9

Workflow file for this run

name: changes
on:
push:
branches: [ main ]
pull_request:
jobs:
changes:
name: Detect files changed
runs-on: ubuntu-latest
permissions:
pull-requests: read
# # this is for job-level control
# outputs:
# npm-test: ${{ steps.filter.outputs.should-run-npm-test }}
# pytest: ${{ steps.filter.outputs.should-run-pytest }}
# darker: ${{ steps.filter.outputs.should-run-darker }}
# new-unknown-files: ${{ steps.filter.outputs.new-files-at-root-level }}
steps:
- name: Checkout source code (merge ref)
uses: actions/checkout@v4
- id: filter
name: Detect files changed
uses: dorny/paths-filter@v3
with:
filters: .github/filters.yml
# echoing (for testing purposes)
- if: ${{ steps.filter.outputs.should-run-npm-test == 'true' }}
run: echo 'frontend files changed; should run npm-test.yml'
- if: ${{ steps.filter.outputs.should-run-pytest == 'true' }}
run: echo 'backend files changed; should run pytest.yml'
- if: ${{ steps.filter.outputs.should-run-darker == 'true' }}
run: echo 'python files changed; should run darker.yml'
- if: ${{ steps.filter.outputs.new-files-at-root-level == 'true' }}
run: echo 'unlisted files changed; will likely run pytest and npm-test'