diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..781cfaf --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,41 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run the tests + +name: Tests + +on: + push: + branches: ["main"] + pull_request: + branches: + - "**" + +jobs: + unit-tests: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [24.x] + + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 11 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "pnpm" + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm run build + + - name: Run unit tests + run: pnpm run test