diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6f25304..c83fa37 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish to NPM +name: Publish on: release: @@ -9,7 +9,7 @@ permissions: contents: read jobs: - publish: + npm: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9ac9aa1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Test + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18, 20, 22, 24] + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + - run: npm ci + - run: npm run typecheck + - run: npm run lint + - run: npm run test:run