-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: skip tests if unaffected TASK-1316 #5295
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
c68a8c4
wip - ci: skip tests if unaffected
p2edwards 3645b12
wip
p2edwards 2ee3512
test unrecognized file
p2edwards 58e3a6f
test - and hold most runner tests for now
p2edwards ce1060f
test
p2edwards d3f5439
test
p2edwards 36d23f8
wip - conditional running
p2edwards 77c4f12
wip test TMP - if skipped
p2edwards 07bb48e
wip test … minus unknown file
p2edwards 5175236
wip test
p2edwards 77f17ef
wip legibility
p2edwards e4c409d
wip
p2edwards f212d1f
wip comment
p2edwards e546e36
call workflows from 'ci.yml' to consolidate list
p2edwards 0c0efa5
wip test - validate
p2edwards d85c225
run workflows whose yml have changed
p2edwards acae755
brevity
p2edwards 72a79aa
test hunch about darker
p2edwards 2fef582
test darker
p2edwards d3b9d92
revert test of darker
p2edwards 600f7fa
Separate 'darker fix' to new small PR
p2edwards 52e35ba
Merge branch 'main' into phil/ci-paths-filter
p2edwards a11fd37
style: comment
p2edwards 7580008
style: minimal change
p2edwards eb21967
style: presentation
p2edwards 8807a15
simplify logic
p2edwards 5682f59
style: presentation
p2edwards df60d52
simplify logic
p2edwards File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Path filters. Used by workflows/ci.yml to decide which jobs to run. | ||
|
||
# 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 | ||
|
||
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 | ||
Comment on lines
+17
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. frontend-related paths that will trigger npm-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: ci | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
permissions: { pull-requests: read } | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: filter | ||
uses: dorny/paths-filter@v3 | ||
name: Detect changed files | ||
with: { filters: .github/filters.yml } | ||
outputs: | ||
darker: ${{ steps.filter.outputs.darker }} | ||
pytest: ${{ steps.filter.outputs.pytest }} | ||
npm-test: ${{ steps.filter.outputs.npm-test }} | ||
|
||
darker: | ||
needs: changes | ||
uses: ./.github/workflows/darker.yml | ||
if: needs.changes.outputs.darker == 'true' | ||
|
||
pytest: | ||
needs: changes | ||
uses: ./.github/workflows/pytest.yml | ||
if: needs.changes.outputs.pytest == 'true' | ||
|
||
npm-test: | ||
needs: changes | ||
uses: ./.github/workflows/npm-test.yml | ||
if: needs.changes.outputs.npm-test == 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Python linter (Darker) | ||
|
||
on: [pull_request] | ||
on: workflow_call | ||
jobs: | ||
darker: | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: npm-test | |
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ name: pytest | |
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backend-related paths that will trigger darker/pytest
cc @noliveleger