-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use github actions to check the code for linting and formatting e…
…rrors (#373) * ci: add github actions * chore: add a `.nvmrc` * build: better naming * style: formatting * ci: try caching the installed deps * ci: just make it much simpler
- Loading branch information
1 parent
fa56f84
commit 9ceefa2
Showing
4 changed files
with
48 additions
and
3 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,41 @@ | ||
name: pr | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
lint-and-format: | ||
name: lint-and-format | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step uses the actions/checkout action to download a copy of your repository on the runner. | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
# This step uses the pnpm/action-setup action to set up pnpm on the runner. | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 9 | ||
|
||
# This step uses the actions/setup-node action to set up a Node.js environment on the runner. | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
# This step runs the install script for the selected node package manager. | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
# This step runs the ci script for linting to check for linting errors. | ||
- name: Run the linter to check for linting errors | ||
run: pnpm ci:lint | ||
|
||
# This step runs the ci script for formatting to check for formatting errors. | ||
- name: Run the formatter to check for formatting errors | ||
run: pnpm ci:format |
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 @@ | ||
v20.10.0 |
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