E2E Tests (Deployed Target) #55
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: E2E Tests (Deployed Target) | |
| on: | |
| schedule: | |
| # Run every day at (6/7am Eastern) before the start of the workday | |
| - cron: "0 11 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "git reference to deploy (e.g., a branch, tag, or commit SHA)" | |
| required: true | |
| type: string | |
| target: | |
| description: "application environment to run tests against (dev / prod TK)" | |
| required: true | |
| default: "staging" | |
| type: choice | |
| options: | |
| - staging | |
| playwright_tags: | |
| description: "pipe separated list of @tags denoting groups of tests to run" | |
| required: false | |
| type: string | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e-tests-deployed: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [1, 2, 3, 4] | |
| total_shards: [4] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set target | |
| run: if [[ -z "${{ inputs.target }}" ]]; then echo "defaulted_target=staging" >> "$GITHUB_ENV"; else echo "defaulted_target=${{ inputs.target }}" >> "$GITHUB_ENV"; fi | |
| - name: Run E2E tests | |
| uses: ./.github/actions/e2e | |
| with: | |
| version: ${{ inputs.version || github.ref }} | |
| target: ${{ env.defaulted_target }} | |
| total_shards: ${{ matrix.total_shards }} | |
| current_shard: ${{ matrix.shard }} | |
| playwright_tags: ${{ inputs.playwright_tags }} | |
| staging_test_user_email: ${{ secrets.STAGING_TEST_USER_EMAIL }} | |
| staging_test_user_password: ${{ secrets.STAGING_TEST_USER_PASSWORD }} | |
| staging_test_user_mfa_key: ${{ secrets.STAGING_TEST_USER_MFA_KEY }} | |
| create-report: | |
| name: Create Merged Test Report | |
| if: ${{ !cancelled() }} | |
| needs: e2e-tests-deployed | |
| uses: ./.github/workflows/e2e-create-report.yml | |
| secrets: inherit | |
| with: | |
| run_id: ${{ github.run_id }} | |
| send-slack-notification: | |
| if: failure() | |
| needs: [create-report] | |
| uses: ./.github/workflows/send-slack-notification.yml | |
| with: | |
| "channel_id": "alerts-e2e" | |
| secrets: inherit |