Skip to content

Commit

Permalink
ci: split workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Dec 3, 2023
1 parent ec1fd77 commit c312c6f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
check-latest: true
cache: yarn
- run: yarn install
- run: yarn lint:ci
- run: yarn format:check
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node.js CI
name: Test

on:
pull_request:
Expand All @@ -23,5 +23,4 @@ jobs:
check-latest: true
cache: yarn
- run: yarn install
- run: yarn lint:ci
- run: yarn test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview",
"lint": "eslint . --cache --fix",
"lint:ci": "eslint . --cache --cache-location ./node_modules/.cache/eslint/.eslintcache --max-warnings 0",
"format": "prettier --write --cache .",
"format": "prettier --write --log-level warn --cache .",
"format:check": "prettier --check --cache .",
"test": "run build && jest",
"all": "run lint && run format && run test"
Expand Down

0 comments on commit c312c6f

Please sign in to comment.