Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit d67a5f4

Browse files
committed
ci: use pnpm setup
1 parent e8218a9 commit d67a5f4

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,23 @@ jobs:
1919
with:
2020
node-version-file: '.nvmrc'
2121

22-
- name: Install dependencies
23-
run: npx ci
24-
25-
- name: Build
26-
run: npm run build
22+
- name: Setup pnpm
23+
uses: pnpm/[email protected]
24+
with:
25+
version: 7
26+
run_install: true
2727

2828
- name: Lint
29-
run: npm run lint
29+
run: pnpm lint
30+
31+
- name: Type check
32+
run: pnpm type-check
33+
34+
- name: Build
35+
run: pnpm build
3036

3137
- name: Release
3238
env:
3339
GH_TOKEN: ${{ secrets.GH_TOKEN }}
3440
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
35-
run: npx semantic-release
41+
run: pnpx semantic-release

.github/workflows/test.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches: [develop]
55
pull_request:
66
branches: [master, develop, next]
7+
78
jobs:
89
test:
910
name: Test
@@ -15,14 +16,24 @@ jobs:
1516
steps:
1617
- name: Checkout
1718
uses: actions/checkout@v3
19+
1820
- name: Use Node.js
1921
uses: actions/setup-node@v3
2022
with:
2123
node-version-file: '.nvmrc'
22-
- name: Install dependencies
23-
run: npx ci
24-
- name: Test
25-
run: npm run test
24+
25+
- name: Setup pnpm
26+
uses: pnpm/[email protected]
27+
with:
28+
version: 7
29+
run_install: true
30+
2631
- name: Lint
2732
if: ${{ matrix.os == 'ubuntu-latest' }}
28-
run: npm run lint
33+
run: pnpm lint
34+
35+
- name: Type check
36+
run: pnpm type-check
37+
38+
- name: Test
39+
run: pnpm test

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"build": "pkgroll --target=node12.19 --minify",
2929
"lint": "eslint .",
3030
"type-check": "tsc --noEmit",
31-
"pretest": "npm run build",
32-
"test": "node --loader @esbuild-kit/esm-loader tests"
31+
"test": "pnpm build && node --loader @esbuild-kit/esm-loader tests"
3332
},
3433
"dependencies": {
3534
"@esbuild-kit/core-utils": "^2.3.1",

0 commit comments

Comments
 (0)