Production - coverage #746
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: Production - coverage | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 */12 * * *" | |
| jobs: | |
| basicTests: | |
| strategy: | |
| fail-fast: false | |
| name: "Playwright tests" | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-22.04 | |
| container: mcr.microsoft.com/playwright:latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| # https://github.com/actions/runner-images/issues/6775 | |
| - run: | | |
| echo "$GITHUB_WORKSPACE" | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| npx playwright install-deps | |
| npx playwright install | |
| - name: Create coverage variance | |
| run: ./scripts/create-coverage-variance.sh | |
| - name: Run coverage e2e tests | |
| shell: bash | |
| continue-on-error: true | |
| env: | |
| CURRENTS_PROJECT_ID: ${{ secrets.CURRENTS_PROJECT_ID }} | |
| CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }} | |
| CURRENTS_CI_BUILD_ID: "coverage-${{ github.run_id }}-${{ github.run_attempt }}" | |
| run: | | |
| node scripts/fake-git-data/fake-git-data.js | |
| npx start-server-and-test dev http://localhost:3000 "npx playwright test --project nextjs" | |
| - name: Print coverage output contents | |
| run: | | |
| ls -la .nyc_output | |
| find .nyc_output -type f -exec sh -c 'echo "=== Contents of $1 ==="; cat "$1"' sh {} \; |