-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-actions: Add lint workflow for new-log-viewer. (#61)
- Loading branch information
1 parent
4b65341
commit 867b72e
Showing
6 changed files
with
72 additions
and
12 deletions.
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,44 @@ | ||
name: "lint" | ||
|
||
on: | ||
pull_request: | ||
types: ["opened", "reopened"] | ||
push: | ||
schedule: | ||
# Run at midnight UTC every day with 15 minutes delay added to avoid high load periods | ||
- cron: "15 0 * * *" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
# So the workflow can cancel in-progress jobs | ||
actions: "write" | ||
|
||
concurrency: | ||
group: "${{github.workflow}}-${{github.ref}}" | ||
# Cancel in-progress jobs for efficiency | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-check: | ||
runs-on: "ubuntu-latest" | ||
permissions: | ||
# So `eslint-annotate-action` can create / update status checks | ||
checks: "write" | ||
# So `eslint-annotate-action` can get pull request files | ||
contents: "read" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
with: | ||
submodules: "recursive" | ||
- uses: "actions/setup-node@v4" | ||
with: | ||
node-version: 22 | ||
- run: "npm --prefix new-log-viewer/ clean-install" | ||
- run: "npm --prefix new-log-viewer/ run lint:ci" | ||
continue-on-error: true | ||
- uses: "ataylorme/eslint-annotate-action@v3" | ||
with: | ||
fail-on-error: true | ||
fail-on-warning: true | ||
only-pr-files: true | ||
report-json: "./new-log-viewer/eslint-report.json" |
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
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
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
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
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