Skip to content

wip - ci: skip tests if unaffected #1

wip - ci: skip tests if unaffected

wip - ci: skip tests if unaffected #1

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
outputs:
npm-test: ${{ steps.filter.outputs.should-run-npm-test }}
pytest: ${{ steps.filter.outputs.should-run-pytest }}
darker: ${{ steps.filter.outputs.should-run-darker }}
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.npm-test
run: echo 'frontend files changed; should run npm-test.yml'\
- if: steps.filter.outputs.pytest
run: echo 'backend files changed; should run pytest.yml'
- if: steps.filter.outputs.darker
run: echo 'python files changed; should run darker.yml'
- if: steps.filter.outputs.ci
run: echo 'selective ci filtering updated'
- if: steps.filter.outputs.new-unknown-files:

Check failure on line 40 in .github/workflows/changes.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/changes.yml

Invalid workflow file

You have an error in your yaml syntax on line 40
run: echo 'unlisted files changed; will likely run pytest and npm-test'