From f127a7c0cc60fc8d4a45d6b21e13081abc510ab4 Mon Sep 17 00:00:00 2001 From: Munieru <20086673+munierujp@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:02:21 +0900 Subject: [PATCH 1/7] Fix test action --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d1986f5..7c60b858 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,4 +10,4 @@ jobs: with: node-version-file: '.node-version' - run: yarn install - - run: yarn test + - run: yarn test:unit From 1a8aa015512ff40804c32f59e8fa3b07b0cb177d Mon Sep 17 00:00:00 2001 From: Munieru <20086673+munierujp@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:12:39 +0900 Subject: [PATCH 2/7] Create e2e.yml --- .github/workflows/e2e.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..e1c36310 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,24 @@ +name: e2e +on: push + +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.node-version' + - name: Install dependencies + run: yarn install + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: yarn test:e2e + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 From 3d4843203b239d01afa395c87fd3673f00f4a58a Mon Sep 17 00:00:00 2001 From: Munieru <20086673+munierujp@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:21:50 +0900 Subject: [PATCH 3/7] Fix e2e.yml --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e1c36310..fe868e28 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -11,11 +11,11 @@ jobs: with: node-version-file: '.node-version' - name: Install dependencies - run: yarn install + run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests - run: yarn test:e2e + run: npx playwright test - uses: actions/upload-artifact@v3 if: always() with: From 88f7668d8f4488777c5d187a28771e2f548c4d48 Mon Sep 17 00:00:00 2001 From: Munieru <20086673+munierujp@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:23:00 +0900 Subject: [PATCH 4/7] Revert "Fix e2e.yml" This reverts commit 3d4843203b239d01afa395c87fd3673f00f4a58a. --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index fe868e28..e1c36310 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -11,11 +11,11 @@ jobs: with: node-version-file: '.node-version' - name: Install dependencies - run: npm ci + run: yarn install - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run Playwright tests - run: npx playwright test + run: yarn test:e2e - uses: actions/upload-artifact@v3 if: always() with: From aed2c9fff922573bcdc10e549e52b78b9e72fcdd Mon Sep 17 00:00:00 2001 From: Munieru <20086673+munierujp@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:23:51 +0900 Subject: [PATCH 5/7] Enable headless --- test-e2e/kamimap.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-e2e/kamimap.spec.ts b/test-e2e/kamimap.spec.ts index eec14212..6007fa23 100644 --- a/test-e2e/kamimap.spec.ts +++ b/test-e2e/kamimap.spec.ts @@ -2,7 +2,7 @@ import { test, expect } from '@playwright/test'; import { chromium } from 'playwright'; test('URL Check', async () => { - const browser = await chromium.launch({ headless: false }); + const browser = await chromium.launch(); const context = await browser.newContext(); const page = await context.newPage(); From 87355e120ad0d56d05f1ff685e91c6f6ff3e2556 Mon Sep 17 00:00:00 2001 From: Munieru <20086673+munierujp@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:26:17 +0900 Subject: [PATCH 6/7] Add comments --- .github/workflows/e2e.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e1c36310..9fc9e4bf 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,3 +1,4 @@ +# see https://playwright.dev/docs/ci-intro name: e2e on: push From 18d1e47635fc37fcce83992bfd872ecb93c6f2d9 Mon Sep 17 00:00:00 2001 From: Munieru <20086673+munierujp@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:27:45 +0900 Subject: [PATCH 7/7] Update e2e.yml --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9fc9e4bf..8a76ae37 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,7 +14,7 @@ jobs: - name: Install dependencies run: yarn install - name: Install Playwright Browsers - run: npx playwright install --with-deps + run: yarn playwright install --with-deps - name: Run Playwright tests run: yarn test:e2e - uses: actions/upload-artifact@v3