diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..945660b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + name: Test (Node ${{ matrix.node }}) + runs-on: ubuntu-latest + strategy: + matrix: + node: ["18", "22"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: npm + - run: npm ci + - name: Type-check + run: npm run lint + - name: Test + run: npm test diff --git a/package.json b/package.json index 7d107f2..97b06e1 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build": "tsc", "dev": "tsc --watch", "lint": "tsc --noEmit", - "test": "tsc && node --test \"test/*.test.js\"", + "test": "tsc && node --test test/*.test.js", "prepare": "tsc" }, "keywords": [