diff --git a/.github/workflows/qa.yaml b/.github/workflows/qa.yaml new file mode 100644 index 0000000..9756799 --- /dev/null +++ b/.github/workflows/qa.yaml @@ -0,0 +1,30 @@ +name: Quality Assurance + +on: + - push + +jobs: + test: + env: + PNPM_VERSION: '9.1.1' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + run_install: | + cwd: ./ + args: [--frozen-lockfile] + version: ${{ env.PNPM_VERSION }} + + - name: Check code style + run: pnpm lint + + - name: Check library build + run: pnpm build + + - name: Run tests + run: pnpm test \ No newline at end of file diff --git a/package.json b/package.json index 07873bf..e92df70 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,9 @@ "scripts": { "dev": "vite dev", "start": "pnpm dev", - "build": "vite build" + "build": "vite build", + "test": "vitest --run", + "lint": "eslint ." }, "keywords": [ "svelte",