diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000..49e5c11 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,16 @@ +name: Node.js CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Run unit tests + uses: actions/setup-node@v3 + with: + node-version: '18.x' + - run: npm ci + - run: npm test diff --git a/package.json b/package.json index 58d3fcd..b7a19d4 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "build": "tsc && vite build", "preview": "vite preview", "test": "vitest && npm run test:browser", - "test:browser": "yarn test:browser:chrome && yarn test:browser:firefox", + "test:browser": "npm run test:browser:chrome", "test:browser:chrome": "vitest --config vitest-browser.config.ts --browser=chrome", "test:browser:firefox": "vitest --config vitest-browser.config.ts --browser=firefox" },