From 24430f26c044fb9f10238f7b5bb86fadae6d523e Mon Sep 17 00:00:00 2001 From: Mark Jayson Fuentes Date: Thu, 4 Dec 2025 04:54:02 +0800 Subject: [PATCH 1/4] chore: update CI configuration and add jest-junit reporter --- .github/workflows/ci.yaml | 14 +++++++++++--- jest.config.js | 7 +++++++ package-lock.json | 34 ++++++++++++++++++++++++++++++++++ package.json | 1 + 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7f097ec..10f418b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,10 +15,10 @@ jobs: node-version: [22.x] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: node-version: ${{ matrix.node-version }} cache: 'npm' @@ -27,7 +27,15 @@ jobs: run: npm ci - name: Run tests - run: npm test + run: npx jest --reporters=default --reporters=jest-junit + + - name: Mergify CI Upload + if: success() || failure() + uses: mergifyio/gha-mergify-ci@v8 + with: + job_name: justbecause_landing_test_node (${{ matrix.node-version }}) + token: ${{ secrets.MERGIFY_TOKEN }} + report_path: junit.xml - name: Build application run: npm run build diff --git a/jest.config.js b/jest.config.js index a46efea..033e1c1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -8,4 +8,11 @@ module.exports = { moduleNameMapper: { '^@/(.*)$': '/$1', }, + reporters: [ + 'default', + ['jest-junit', { + outputDirectory: '.', + outputName: 'junit.xml' + }] + ] }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8955738..e8f60e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "eslint": "^9", "eslint-config-next": "15.4.6", "jest": "^30.0.5", + "jest-junit": "^16.0.0", "postcss": "^8.5", "tailwindcss": "^4", "ts-jest": "^29.4.1", @@ -17795,6 +17796,32 @@ "fsevents": "^2.3.3" } }, + "node_modules/jest-junit": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz", + "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mkdirp": "^1.0.4", + "strip-ansi": "^6.0.1", + "uuid": "^8.3.2", + "xml": "^1.0.1" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/jest-junit/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/jest-leak-detector": { "version": "30.0.5", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.0.5.tgz", @@ -22723,6 +22750,13 @@ } } }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "dev": true, + "license": "MIT" + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 28b270c..ad5ba7a 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "eslint": "^9", "eslint-config-next": "15.4.6", "jest": "^30.0.5", + "jest-junit": "^16.0.0", "postcss": "^8.5", "tailwindcss": "^4", "ts-jest": "^29.4.1", From a16069a7107bb937bfb5af65a23d6752767e60aa Mon Sep 17 00:00:00 2001 From: Mark Jayson Fuentes Date: Thu, 4 Dec 2025 04:59:15 +0800 Subject: [PATCH 2/4] fix: change CI runner from self-hosted to github-runner-gcloud --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10f418b..4841fbc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: jobs: test: - runs-on: self-hosted + runs-on: github-runner-gcloud strategy: matrix: From 62cb85b7a4b8cdb1ad89ed16440a4a5df2848388 Mon Sep 17 00:00:00 2001 From: Mark Jayson Fuentes Date: Thu, 4 Dec 2025 05:00:49 +0800 Subject: [PATCH 3/4] fix: update CI runner configuration to use gcloud --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4841fbc..206a14f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: jobs: test: - runs-on: github-runner-gcloud + runs-on: gcloud strategy: matrix: From ee8b30b5bb844ddf19cab119a7f1bfb4d8c66789 Mon Sep 17 00:00:00 2001 From: Mark Jayson Fuentes Date: Thu, 4 Dec 2025 05:17:45 +0800 Subject: [PATCH 4/4] fix: change CI runner from gcloud to ubuntu-latest --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 206a14f..7aebae6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: jobs: test: - runs-on: gcloud + runs-on: ubuntu-latest strategy: matrix: