From 3ef84e97fc256a0d26395e6b56f720c25dff6c76 Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 15:09:35 +0900 Subject: [PATCH 1/9] =?UTF-8?q?build:=20e2e=20test=20action=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2etest.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/e2etest.yml diff --git a/.github/workflows/e2etest.yml b/.github/workflows/e2etest.yml new file mode 100644 index 00000000..791ed02b --- /dev/null +++ b/.github/workflows/e2etest.yml @@ -0,0 +1,36 @@ +name: Cypress Tests + +on: + pull_request: + branches: + - main + paths-ignore: + - README.md + - CONTRIBUTING.md + - .gitignore + - frontend/components/admin/** + - frontend/components/kanban/** + - frontend/database/** + - frontend/mock/** + - frontend/**/*.yaml + +jobs: + prepare-install: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'pnpm' + cache-dependency-path: frontend/pnpm-lock.yaml + - name: Cypress run + uses: cypress-io/github-action@v6 + with: + working-directory: frontend From 175fca15f13c0ef62c60d1602c747a58059bcffb Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 15:14:19 +0900 Subject: [PATCH 2/9] build: local server detect --- .github/workflows/e2etest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2etest.yml b/.github/workflows/e2etest.yml index 791ed02b..f518a59a 100644 --- a/.github/workflows/e2etest.yml +++ b/.github/workflows/e2etest.yml @@ -34,3 +34,5 @@ jobs: uses: cypress-io/github-action@v6 with: working-directory: frontend + start: pnpm start + wait-on: 'http://localhost:3000' From 795e76b3f178f7331516af0a0171f0b5618d5ea5 Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 15:16:19 +0900 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20command=20=EC=98=AC=EB=B0=94?= =?UTF-8?q?=EB=A5=B4=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2etest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2etest.yml b/.github/workflows/e2etest.yml index f518a59a..19baa947 100644 --- a/.github/workflows/e2etest.yml +++ b/.github/workflows/e2etest.yml @@ -34,5 +34,5 @@ jobs: uses: cypress-io/github-action@v6 with: working-directory: frontend - start: pnpm start + start: pnpm run dev wait-on: 'http://localhost:3000' From 75675ecdcdd62ae240501fea24f8a292d734c4e7 Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 15:34:36 +0900 Subject: [PATCH 4/9] =?UTF-8?q?build:=20summary=20title=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2etest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2etest.yml b/.github/workflows/e2etest.yml index 19baa947..11e8868f 100644 --- a/.github/workflows/e2etest.yml +++ b/.github/workflows/e2etest.yml @@ -36,3 +36,5 @@ jobs: working-directory: frontend start: pnpm run dev wait-on: 'http://localhost:3000' + summary-title: 'Cypress Tests In Development' + publish-summary: true From b6535f5e69d6bbc4bac64ea30cf2530a76a6438d Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 16:01:23 +0900 Subject: [PATCH 5/9] =?UTF-8?q?chore:=20gitignore=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/.gitignore b/frontend/.gitignore index 3878bd81..2ba642a6 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -8,6 +8,10 @@ # testing /coverage +# Ignore Cypress screenshots and results +frontend/cypress/screenshots/ +frontend/results/ + # next.js /.next/ /out/ From b2af5847338874a0b3b44f5f695e2d12912b0178 Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 16:02:16 +0900 Subject: [PATCH 6/9] =?UTF-8?q?build:=20PR=20Comment=20=EB=84=A3=EC=9D=84?= =?UTF-8?q?=20=EC=88=98=20=EC=9E=88=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2etest.yml | 9 +++++++++ frontend/cypress.config.ts | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/e2etest.yml b/.github/workflows/e2etest.yml index 11e8868f..09d13f37 100644 --- a/.github/workflows/e2etest.yml +++ b/.github/workflows/e2etest.yml @@ -38,3 +38,12 @@ jobs: wait-on: 'http://localhost:3000' summary-title: 'Cypress Tests In Development' publish-summary: true + - name: Merge Cypress JUnit test results + run: junit-merge frontend/results/*.xml > frontend/results/merged-test-results.xml + + - name: Upload merged test results as PR comment + uses: mikepenz/action-junit-report@v4 + with: + report_paths: 'frontend/results/merged-test-results.xml' + github_token: ${{ secrets.PR_RW_TOKEN }} + check_name: 'Cypress Test Results' diff --git a/frontend/cypress.config.ts b/frontend/cypress.config.ts index b906329b..8856d3f2 100644 --- a/frontend/cypress.config.ts +++ b/frontend/cypress.config.ts @@ -8,5 +8,10 @@ export default defineConfig({ setupNodeEvents(on, config) { // implement node event listeners here }, + reporter: "junit", + reporterOptions: { + mochaFile: "results/test-report-[hash].xml", + toConsole: true, + }, }, }); From 6755d20777f6a2919a0681b0cb1bbf37ffb5a20b Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 16:09:37 +0900 Subject: [PATCH 7/9] =?UTF-8?q?fix:=20junit-merge=20=EC=8B=A4=ED=96=89=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2etest.yml | 5 +++++ frontend/cypress.config.ts | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2etest.yml b/.github/workflows/e2etest.yml index 09d13f37..2c30a9da 100644 --- a/.github/workflows/e2etest.yml +++ b/.github/workflows/e2etest.yml @@ -38,6 +38,11 @@ jobs: wait-on: 'http://localhost:3000' summary-title: 'Cypress Tests In Development' publish-summary: true + + - name: Install junit-merge + run: pnpm add -g junit-merge + if: always() + - name: Merge Cypress JUnit test results run: junit-merge frontend/results/*.xml > frontend/results/merged-test-results.xml diff --git a/frontend/cypress.config.ts b/frontend/cypress.config.ts index 8856d3f2..2d6b4910 100644 --- a/frontend/cypress.config.ts +++ b/frontend/cypress.config.ts @@ -11,7 +11,6 @@ export default defineConfig({ reporter: "junit", reporterOptions: { mochaFile: "results/test-report-[hash].xml", - toConsole: true, }, }, }); From 5142969e4b16d2317e0f7f8ef0ddab2507cf988c Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Wed, 26 Mar 2025 16:13:33 +0900 Subject: [PATCH 8/9] =?UTF-8?q?feat:=20=EC=A2=85=EC=86=8D=20=EC=9E=91?= =?UTF-8?q?=EC=97=85=20=EA=B0=95=EC=A0=9C=20=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2etest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2etest.yml b/.github/workflows/e2etest.yml index 2c30a9da..56e6b519 100644 --- a/.github/workflows/e2etest.yml +++ b/.github/workflows/e2etest.yml @@ -45,9 +45,11 @@ jobs: - name: Merge Cypress JUnit test results run: junit-merge frontend/results/*.xml > frontend/results/merged-test-results.xml + if: always() - name: Upload merged test results as PR comment uses: mikepenz/action-junit-report@v4 + if: always() with: report_paths: 'frontend/results/merged-test-results.xml' github_token: ${{ secrets.PR_RW_TOKEN }} From 980edfa004a473bcf875d45b7cbfbd8813dab7c0 Mon Sep 17 00:00:00 2001 From: 2yunseong Date: Fri, 28 Mar 2025 17:37:13 +0900 Subject: [PATCH 9/9] =?UTF-8?q?feat:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EC=9E=91=EC=97=85=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/cypress.config.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/cypress.config.ts b/frontend/cypress.config.ts index 2d6b4910..b242ddb3 100644 --- a/frontend/cypress.config.ts +++ b/frontend/cypress.config.ts @@ -8,9 +8,6 @@ export default defineConfig({ setupNodeEvents(on, config) { // implement node event listeners here }, - reporter: "junit", - reporterOptions: { - mochaFile: "results/test-report-[hash].xml", - }, }, + projectId: "4k3nb1", });