diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..e67363c --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,19 @@ +name: Build + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + cache: "npm" + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/package-lock.json b/package-lock.json index fa59180..e249b75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "devDependencies": { "@types/node": "^20.12.4", "prettier": "^3.2.5", - "tsc": "^2.0.4", "typescript": "^5.4.3", "vitest": "^1.4.0" } @@ -1358,15 +1357,6 @@ "node": ">=14.0.0" } }, - "node_modules/tsc": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/tsc/-/tsc-2.0.4.tgz", - "integrity": "sha512-fzoSieZI5KKJVBYGvwbVZs/J5za84f2lSTLPYf6AGiIf43tZ3GNrI1QzTLcjtyDDP4aLxd46RTZq1nQxe7+k5Q==", - "dev": true, - "bin": { - "tsc": "bin/tsc" - } - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", diff --git a/package.json b/package.json index 33c1a9d..a2a33a1 100644 --- a/package.json +++ b/package.json @@ -6,14 +6,14 @@ "scripts": { "build": "tsc", "format": "prettier -w .", - "test": "vitest" + "test": "vitest run", + "test:watch": "vitest" }, "author": "haroldadmin", "license": "ISC", "devDependencies": { "@types/node": "^20.12.4", "prettier": "^3.2.5", - "tsc": "^2.0.4", "typescript": "^5.4.3", "vitest": "^1.4.0" }