Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into docs/fix-broken-error
Browse files Browse the repository at this point in the history
  • Loading branch information
tasshi-me committed Oct 24, 2024
2 parents e325204 + 28318f2 commit 2d57f6f
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 64 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: test-npm

on:
push:
branches:
- main
- "renovate/**"
pull_request:

jobs:
prepare:
name: Prepare npm package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "pnpm"

- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm pack
- run: mv kintone-cli-*.tgz kintone-cli.tgz
- uses: actions/upload-artifact@v4
with:
name: kintone-cli.tgz
path: kintone-cli.tgz

test-install:
name: Test npm install - Node.js ${{ matrix.os }} ${{ matrix.node-version }}
needs: prepare
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22.x, 20.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/download-artifact@v4
with:
name: kintone-cli.tgz
- run: npm install -g kintone-cli.tgz
- run: cli-kintone --version

test-npx:
name: Test npx - Node.js ${{ matrix.os }} ${{ matrix.node-version }}
needs: prepare
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [22.x, 20.x, 18.x]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/download-artifact@v4
with:
name: kintone-cli.tgz
- run: npx kintone-cli.tgz --version
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"cli-kintone": "cli.js"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "run-s clean:lib 'build:tsc --watch'",
"build": "run-s clean:lib build:tsc",
"build:all": "run-s build build:artifacts",
Expand Down Expand Up @@ -77,8 +76,8 @@
"@cybozu/eslint-config": "^24.0.0-beta.0",
"@cybozu/license-manager": "^1.2.1",
"@octokit/rest": "^20.1.1",
"@types/jest": "^29.5.13",
"@types/node": "^18.19.58",
"@types/jest": "^29.5.14",
"@types/node": "^18.19.59",
"@types/rollup-plugin-auto-external": "^2.0.5",
"@types/yargs": "^17.0.33",
"@vercel/ncc": "^0.38.2",
Expand Down
Loading

0 comments on commit 2d57f6f

Please sign in to comment.