chore: update GHA workflows

This commit is contained in:
Kodai Nakamura 2025-12-20 21:38:44 +09:00
parent 58adb2bf86
commit 45e8ae1e1a
5 changed files with 50 additions and 29 deletions

37
.github/workflows/check.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Vitest
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "22.x"
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Run tsc
run: pnpm tsc
- name: Run lint
run: pnpm lint
- name: Run test
run: pnpm test

View file

@ -23,9 +23,20 @@ jobs:
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Run tsc
run: pnpm tsc
- name: Run lint
run: pnpm lint
- name: Run test
run: pnpm test
- name: Build plugin
run: |
pnpm install
pnpm run build
- name: Create release

View file

@ -1,28 +0,0 @@
name: Vitest
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run tests with Vitest
run: npm run test

View file

@ -9,6 +9,7 @@
"version": "node version-bump.mjs && git add manifest.json versions.json",
"test": "VITE_CJS_IGNORE_WARNING=true vitest run",
"test:watch": "VITE_CJS_IGNORE_WARNING=true vitest",
"tsc": "tsc -noEmit -skipLibCheck",
"tsc:watch": "tsc -noEmit -skipLibCheck --watch",
"lint": "eslint .",
"lint:watch": "nodemon --watch src --ext js,ts --exec \"npm run lint\""