diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..633bd2f6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,17 @@ +name: Node.js CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20.x' + - run: npm ci + - run: npm run build --if-present + - run: npm test + diff --git a/package.json b/package.json index de0e6664..24f86ab6 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "prepublishOnly": "npm run package", "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", - "test": "vitest", + "test": "vitest run", "lint": "prettier --plugin-search-dir . --check .", "format": "prettier --plugin-search-dir . --write ." },