chore: migrate CI workflows and git hooks to pnpm
- ci.yml: add pnpm/action-setup, cache pnpm, use pnpm exec - bump-version.yml: add pnpm/action-setup, pnpm version, drop package-lock.json from git add - husky pre-commit: npm run -> pnpm run
This commit is contained in:
6
.github/workflows/bump-version.yml
vendored
6
.github/workflows/bump-version.yml
vendored
@@ -20,10 +20,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ steps.app-token.outputs.token }}
|
token: ${{ steps.app-token.outputs.token }}
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v4
|
||||||
|
|
||||||
- name: Bump patch version
|
- name: Bump patch version
|
||||||
run: |
|
run: |
|
||||||
npm version patch --no-git-tag-version
|
pnpm version patch --no-git-tag-version
|
||||||
git add package.json package-lock.json
|
git add package.json
|
||||||
git diff --cached --quiet && exit 0
|
git diff --cached --quiet && exit 0
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|||||||
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -9,17 +9,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: pnpm/action-setup@v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: npm
|
cache: pnpm
|
||||||
- run: npm ci
|
- run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Format check
|
- name: Format check
|
||||||
run: npm run format:check
|
run: pnpm run format:check
|
||||||
|
|
||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: npx tsc --noEmit
|
run: pnpm exec tsc --noEmit
|
||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: npx vitest run
|
run: pnpm exec vitest run
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
npm run format:fix
|
pnpm run format:fix
|
||||||
|
|||||||
Reference in New Issue
Block a user