From dd94afb3edaa2f734708c622e5e9c81673a51ec7 Mon Sep 17 00:00:00 2001 From: anshulchahar Date: Fri, 6 Dec 2024 00:28:38 +0100 Subject: [PATCH 1/2] Setup unit tests in CI --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05e9623d..12481a92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,27 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22.11.0' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run Jest tests + run: npx jest + prepare: + needs: + - test runs-on: ubuntu-latest steps: - name: Convert repository name to lowercase From 2431bfde210c96d9cd80190d6f008a1320951452 Mon Sep 17 00:00:00 2001 From: anshulchahar Date: Fri, 6 Dec 2024 12:33:42 +0100 Subject: [PATCH 2/2] Temp: Add flagg --passwithnotests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12481a92..91b13d29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: run: npm ci - name: Run Jest tests - run: npx jest + run: npx jest --passWithNoTests prepare: needs: