diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..a6aa04b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test + +on: + push: + branches: + - main + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node: [20, 22] + + name: Node ${{ matrix.node }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node ${{ matrix.node }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: "npm" + + - name: Install Node dependencies + run: npm ci + + - name: Run linter + run: npm run lint + + - name: Run tests + run: npm run test diff --git a/.npmignore b/.npmignore index 041df1c..0e8b505 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,4 @@ +.github .temp .DS_Store node_modules/