Update package name to playwright-testkit #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Playwright Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install --with-deps | |
| - name: Run Playwright tests | |
| run: pnpm exec playwright test --shard=${{ matrix.shard }}/2 | |
| env: | |
| NODE_ENV: staging | |
| BASE_URL: ${{ secrets.BASE_URL }} | |
| API_BASE_URL: ${{ secrets.API_BASE_URL }} | |
| API_KEY: ${{ secrets.API_KEY }} | |
| - name: Generate Allure Report | |
| if: always() | |
| run: | | |
| pnpm exec allure generate allure-results --clean -o allure-report | |
| - name: Upload Playwright HTML Report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-${{ matrix.shard }} | |
| path: playwright-report/ | |
| retention-days: 30 | |
| - name: Upload Allure Report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-report-${{ matrix.shard }} | |
| path: allure-report/ | |
| retention-days: 30 | |
| - name: Upload Test Results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.shard }} | |
| path: | | |
| test-results/ | |
| allure-results/ | |
| retention-days: 30 | |