Skip to content

Commit

Permalink
ci: use pnpm (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber authored Nov 19, 2022
1 parent 68f4fec commit d761d2d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,31 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 5

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Install dependencies
run: npx ci
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: 7
run_install: true

- name: Test
run: npm test
run: pnpm test

- name: Lint
run: npm run lint
run: pnpm lint

- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
run: pnpm dlx semantic-release
19 changes: 11 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,25 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 5

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Install dependencies
run: npx ci
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.2
with:
version: 7
run_install: true

- name: Test
run: npm test
run: pnpm test

- name: Lint
run: npm run lint
run: pnpm lint
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.15.1
v18.12.1
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"scripts": {
"build": "pkgroll --target=node12.20 --minify",
"lint": "eslint --cache .",
"pretest": "npm run build",
"test": "tsx tests",
"test": "pnpm build && tsx tests",
"dev": "tsx watch --conditions=development tests",
"prepack": "clean-pkg-json"
},
Expand Down

0 comments on commit d761d2d

Please sign in to comment.