diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71b7c242..a1da9174 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,3 +34,25 @@ jobs: cache: "npm" - run: npm ci - run: npm run test + + e2e: + timeout-minutes: 60 + runs-on: ubuntu-latest + env: + VITE_PAGE_NAME: ${{ vars.VITE_PAGE_NAME }} + VITE_API_URL: ${{ vars.VITE_API_URL }} + VITE_CARD_IMAGE_URL: ${{ vars.VITE_CARD_IMAGE_URL }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + cache: "npm" + - run: npm ci + - run: npm run prepare:e2e + - run: npm run test:e2e + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ +# diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index b6c132b1..00000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: End-to-end tests -on: - push: - branches: - - main - pull_request: - branches: - - main -jobs: - test: - timeout-minutes: 60 - runs-on: ubuntu-latest - env: - VITE_PAGE_NAME: ${{ vars.VITE_PAGE_NAME }} - VITE_API_URL: ${{ vars.VITE_API_URL }} - VITE_CARD_IMAGE_URL: ${{ vars.VITE_CARD_IMAGE_URL }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - cache: "npm" - - run: npm ci - - run: npx playwright install --with-deps - - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-report - path: playwright-report/ diff --git a/package.json b/package.json index 8a858276..7a0af895 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "lint": "biome lint", "lint:fix": "biome lint --write", "prepare": "lefthook install", + "prepare:e2e": " playwright install --with-deps", "preview": "vite preview", "test:coverage": "vitest run --coverage", "test": "vitest run",