-
-
Notifications
You must be signed in to change notification settings - Fork 365
chore(ci): Add required checks job for lint dprint #6002
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
Merged
philprime
merged 5 commits into
main
from
cursor/implement-required-checks-for-lint-dprint-c1d3
Aug 28, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
aa42b95
Add dprint linting workflow with conditional file change detection
cursoragent 8087216
cleanup
philprime c94ab28
fix run condition
philprime a4cd40e
Merge remote-tracking branch 'origin/main' into cursor/implement-requ…
philprime c89fbf7
Merge branch 'main' into cursor/implement-required-checks-for-lint-dp…
philprime 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 hidden or 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
This file contains hidden or 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 |
---|---|---|
|
@@ -8,22 +8,8 @@ on: | |
push: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.yml" | ||
- "**/*.yaml" | ||
- "**/*.json" | ||
- "**/*.md" | ||
- ".github/workflows/lint-dprint-formatting.yml" | ||
- "dprint.json" | ||
|
||
pull_request: | ||
paths: | ||
- "**/*.yml" | ||
- "**/*.yaml" | ||
- "**/*.json" | ||
- "**/*.md" | ||
- ".github/workflows/lint-dprint-formatting.yml" | ||
- "dprint.json" | ||
|
||
# Concurrency configuration: | ||
# - We use workflow-specific concurrency groups to prevent multiple lint runs on the same code, | ||
|
@@ -37,9 +23,44 @@ concurrency: | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
jobs: | ||
files-changed: | ||
name: Detect File Changes | ||
runs-on: ubuntu-latest | ||
outputs: | ||
run_lint_dprint_for_prs: ${{ steps.changes.outputs.run_lint_dprint_for_prs }} | ||
steps: | ||
- uses: actions/checkout@v5 | ||
- name: Get changed files | ||
id: changes | ||
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||
with: | ||
token: ${{ github.token }} | ||
filters: .github/file-filters.yml | ||
|
||
lint: | ||
name: Lint | ||
# Run the job only for PRs with related changes or non-PR events. | ||
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_lint_dprint_for_prs == 'true' | ||
needs: files-changed | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v5 | ||
- uses: dprint/[email protected] | ||
|
||
lint-dprint-required-check: | ||
needs: | ||
[ | ||
files-changed, | ||
lint, | ||
] | ||
name: Lint dprint | ||
# This is necessary since a failed/skipped dependent job would cause this job to be skipped | ||
if: always() | ||
runs-on: ubuntu-latest | ||
steps: | ||
# If any jobs we depend on fails gets cancelled or times out, this job will fail. | ||
# Skipped jobs are not considered failures. | ||
- name: Check for failures | ||
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | ||
run: | | ||
echo "One of the lint dprint jobs has failed." && exit 1 |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.