-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add commitlint & code check workflows
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 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,29 @@ | ||
name: Code Check | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
# This allows a subsequently queued workflow run to interrupt previous runs | ||
concurrency: | ||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
prettier: | ||
name: Prettier Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Run Prettier | ||
id: prettier-run | ||
uses: rutajdash/[email protected] | ||
with: | ||
config_path: ./.prettierrc | ||
- name: Prettier Output | ||
if: ${{ failure() }} | ||
shell: bash | ||
run: | | ||
echo "The following files are not formatted:" | ||
echo "${{steps.prettier-run.outputs.prettier_output}}" |
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,18 @@ | ||
name: Commitlint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
commitlint: | ||
name: Commitlint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: | | ||
commitlint.config.js | ||
- name: Run commitlint | ||
uses: dafnik/commitlint@v1 |