From ed24fb8cd011cfbf8a46f42e2f754672653252a6 Mon Sep 17 00:00:00 2001 From: franferrazdev Date: Fri, 16 Oct 2026 16:27:46 -0300 Subject: [PATCH 1/3] fix: resolve github actions cache configuration path input error --- .github/workflows/ci.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a21f94..2f782ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,25 +18,15 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - - - name: Get pnpm store diretory - id: pnpm-store - shell: bash - run: | - echo "store-path=$(pnpm store path)" >> $GITHUB_OUTPUT - - - name: Setup pnpm cache - uses: actions/cache@v4 - with: - path: ${{steps.pnpm-store.outputs.store_path}} - key: ${{runner.os}}-pnpm-store-${{hashFiles('**/pnpm-lock.yaml')}} - restore-keys: | - ${{runner.os}}-pnpm-store- + cache: npm - name: Install Dependencies - run: pnpm test + run: npm ci + + - name: Run Tests + run: npm test - - name: Run Unit Tests (Jest) + - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Run End-to-End Tests (Playwright) From 3724d9df169c7575e05d02adfe4d951041876791 Mon Sep 17 00:00:00 2001 From: franferrazdev Date: Fri, 16 Oct 2026 16:37:56 -0300 Subject: [PATCH 2/3] fix: inject automated webServer configuration block into playwright config --- playwright.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/playwright.config.ts b/playwright.config.ts index 79e9e09..f5a5f11 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -18,4 +18,12 @@ export default defineConfig({ use: { ...devices["Desktop Chrome"] }, }, ], + + // Configuração do Servidor Automático para o CI/CD + webServer: { + command: "pnpm dev", // Comando que inicia o Next.js + url: "http://localhost:3000", // URL que o Playwright vai aguardar responder + reuseExistingServer: !process.env.CI, // No PC ele usa o servidor aberto; no GitHub ele cria um novo + timeout: 120 * 1000, // Tempo limite de 2 minutos para o boot do app + }, }); From b73070eac1976347ab6df2dfe5f63aa9e45c5f49 Mon Sep 17 00:00:00 2001 From: franferrazdev Date: Fri, 16 Oct 2026 16:59:20 -0300 Subject: [PATCH 3/3] fix: change webServer execution command to npm for container compatibility --- playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index f5a5f11..4da4c74 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -21,7 +21,7 @@ export default defineConfig({ // Configuração do Servidor Automático para o CI/CD webServer: { - command: "pnpm dev", // Comando que inicia o Next.js + command: "npm run dev", // Comando que inicia o Next.js url: "http://localhost:3000", // URL que o Playwright vai aguardar responder reuseExistingServer: !process.env.CI, // No PC ele usa o servidor aberto; no GitHub ele cria um novo timeout: 120 * 1000, // Tempo limite de 2 minutos para o boot do app