Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,12 @@ export default defineConfig({
use: { ...devices["Desktop Chrome"] },
},
],

// Configuração do Servidor Automático para o CI/CD
webServer: {
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
},
});
Loading