From 8d9eac48d2c9938ae7583834d2365b925b137c9f Mon Sep 17 00:00:00 2001 From: Rasso Hilber Date: Tue, 22 Oct 2024 20:38:26 +0200 Subject: [PATCH 1/3] Add workflow for running unit tests --- .github/workflows/unit-tests.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/unit-tests.yml 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 From 59ae5b6531ffbdb5d9401bcc2daf18e25fa874a2 Mon Sep 17 00:00:00 2001 From: Rasso Hilber Date: Tue, 22 Oct 2024 20:38:46 +0200 Subject: [PATCH 2/3] fix main job name in e2e-tests --- .github/workflows/e2e-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: From 2c103b7c233366238fe6c430d2372b96bb6a55b9 Mon Sep 17 00:00:00 2001 From: Rasso Hilber Date: Tue, 22 Oct 2024 20:42:49 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Update=20PULL=5FREQUEST=5FTEMPLATE=20?= =?UTF-8?q?=F0=9F=93=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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