diff --git a/.github/filters.yml b/.github/filters.yml index 24bc1cbffc..8460d89663 100644 --- a/.github/filters.yml +++ b/.github/filters.yml @@ -3,17 +3,17 @@ # If any file changed matches any of the filters in a list, the output for that # list is set to the string 'true'. +darker: + - '{kpi,kobo,hub}/**/*.py' # .py + - 'pyproject.toml' # rules + - '.github/workflows/darker.yml' # ci + pytest: - '{kpi,kobo,hub}/**/*.!(md)' # backend - 'dependencies/**/*.!(md)' # pip - 'pyproject.toml' # (can affect build/tests) - '.github/workflows/pytest.yml' # ci -darker: - - '{kpi,kobo,hub}/**/*.py' # .py - - 'pyproject.toml' # rules - - '.github/workflows/darker.yml' # ci - npm-test: - '{jsapp,test,webpack,static,scripts}/**/*.!(md|py|sh|bash)' # frontend - '{package*.json,patches/*.patch,scripts/copy_fonts.py}' # npm + postinstall diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e8215d389..2c427582e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,10 +13,15 @@ jobs: name: Detect changed files with: { filters: .github/filters.yml } outputs: - pytest: ${{ steps.filter.outputs.pytest }} darker: ${{ steps.filter.outputs.darker }} - unknown: ${{ steps.filter.outputs.unknown }} + pytest: ${{ steps.filter.outputs.pytest }} npm-test: ${{ steps.filter.outputs.npm-test }} + unknown: ${{ steps.filter.outputs.unknown }} + + darker: + needs: changes + uses: ./.github/workflows/darker.yml + if: needs.changes.outputs.darker == 'true' pytest: needs: changes @@ -25,11 +30,6 @@ jobs: needs.changes.outputs.pytest == 'true' || needs.changes.outputs.unknown == 'true' - darker: - needs: changes - uses: ./.github/workflows/darker.yml - if: needs.changes.outputs.darker == 'true' - npm-test: needs: changes uses: ./.github/workflows/npm-test.yml