diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8096c06..8ef8bbd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,8 +17,8 @@ Make sure the PR fulfills as many of the following requirements as possible --> - [ ] The PR is submitted to the `main` branch -- [ ] The code was formatted before pushing (`npm run format`) -- [ ] All tests are passing (`npm run test`) +- [ ] The code was formatted before pushing (`pnpm run format`) +- [ ] All tests are passing (`pnpm run test`) - [ ] New or updated tests are included - [ ] The documentation was updated as required diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 114d1b0..01dd3ee 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -8,7 +8,8 @@ on: workflow_dispatch: jobs: - test: + e2e-tests: + name: Run e2e tests timeout-minutes: 60 runs-on: ubuntu-latest steps: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..0b87397 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,34 @@ +name: Unit tests + +on: + push: + branches: [main, next] + pull_request: + workflow_dispatch: + +jobs: + unit-tests: + name: Run unit tests + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Check out repo + uses: actions/checkout@v3 + + - name: Set up node + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Setup pnpm + uses: pnpm/action-setup@v3 # @see https://stackoverflow.com/a/74885077/586823 + + - name: Install dependencies + run: pnpm i + + - name: Build + run: pnpm run build + + - name: Run tests + run: pnpm run test:unit