Skip to content

Commit

Permalink
style: presentation
Browse files Browse the repository at this point in the history
Looks like the checks at the bottom of the PR follows the order defined
in ci.yml.

Place npm-test after the python jobs since the npm-test is a 4-entry
matrix right now and buries the others below the scroll fold

Place pytest on top. it's usually there while you're waiting since it
takes the longest, so this time it doesn't have to move.

Make both files use the same order.

Give "detect changed files" a name to make it easier to find when
you're inspecting results
  • Loading branch information
p2edwards committed Dec 2, 2024
1 parent 7580008 commit eb21967
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
# If any file changed matches any of the filters in a list, the output for that
# list is set to the string 'true'.

npm-test:
- '{jsapp,test,webpack,static,scripts}/**/*.!(md|py|sh|bash)' # frontend
- '{package*.json,patches/*.patch,scripts/copy_fonts.py}' # npm + postinstall
- '{tsconfig.json,.swcrc,.babelrc*,.browserslistrc}' # compilers
- '{.editorconfig,.prettier*,.stylelint*,.eslint*,coffeelint*}' # linters
- '.gitignore' # (can affect tools)
- '.github/workflows/npm-test.yml' # ci

pytest:
- '{kpi,kobo,hub}/**/*.!(md)' # backend
- 'dependencies/**/*.!(md)' # pip
Expand All @@ -22,5 +14,13 @@ darker:
- '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
- '{tsconfig.json,.swcrc,.babelrc*,.browserslistrc}' # compilers
- '{.editorconfig,.prettier*,.stylelint*,.eslint*,coffeelint*}' # linters
- '.gitignore' # (can affect tools)
- '.github/workflows/npm-test.yml' # ci

unknown: # return 'true' if a file was added but not listed here yet
- '!(((\.github|\.storybook|\.tx|cypress|dependencies|docker|hub|jsapp|kobo|kpi|patches|scripts|static|test|webpack)/**)|(\.babelrc\.json|\.browserslistrc|\.coveragerc|\.dockerignore|\.editorconfig|\.eslintignore|\.eslintrc\.js|\.git-blame-ignore-revs|\.gitattributes|\.gitignore|\.gitlab-ci\.yml|\.gitmodules|\.node-version|\.nvmrc|\.prettierrc\.js|\.stylelintrc\.js|\.swcrc|CONTRIBUTING\.md|Dockerfile|LICENSE|README\.md|coffeelint\.json|dependabot\.yml|format-python\.sh|kpi\.code-workspace|locale|manage\.py|package-lock\.json|package\.json|pip-compile\.sh|pyproject\.toml|tsconfig\.json))'
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,14 @@ jobs:
- uses: actions/checkout@v4
- id: filter
uses: dorny/paths-filter@v3
name: Detect changed files
with: { filters: .github/filters.yml }
outputs:
npm-test: ${{ steps.filter.outputs.npm-test }}
pytest: ${{ steps.filter.outputs.pytest }}
darker: ${{ steps.filter.outputs.darker }}
unknown: ${{ steps.filter.outputs.unknown }}

npm-test:
needs: changes
uses: ./.github/workflows/npm-test.yml
if: |
needs.changes.outputs.npm-test == 'true' ||
needs.changes.outputs.unknown == 'true' ||
github.event_name == 'push'
pytest:
needs: changes
uses: ./.github/workflows/pytest.yml
Expand All @@ -42,3 +35,11 @@ jobs:
if: |
needs.changes.outputs.darker == 'true' &&
github.event_name == 'pull_request'
npm-test:
needs: changes
uses: ./.github/workflows/npm-test.yml
if: |
needs.changes.outputs.npm-test == 'true' ||
needs.changes.outputs.unknown == 'true' ||
github.event_name == 'push'

0 comments on commit eb21967

Please sign in to comment.