Docs: Post-Deploy Tests (staging) #117
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: "Docs: Post-Deploy Integration & E2E Tests" | |
| run-name: "Docs: Post-Deploy Tests (${{ github.event.client_payload.environment || 'unknown' }})" | |
| on: | |
| repository_dispatch: | |
| types: [deploy-complete] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.client_payload.commit_sha }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: yarn | |
| - run: yarn install --frozen-lockfile | |
| - name: Install worker test dependencies | |
| working-directory: worker | |
| run: yarn install --frozen-lockfile | |
| - name: Run integration tests | |
| working-directory: worker | |
| env: | |
| TEST_ENV: ${{ github.event.client_payload.environment }} | |
| run: yarn test:integration | |
| - run: npx playwright install chromium | |
| - name: Run e2e tests | |
| env: | |
| TEST_ENV: ${{ github.event.client_payload.environment }} | |
| run: yarn test:e2e | |
| - name: Notify Slack on failure | |
| if: failure() | |
| env: | |
| SLACK_NOTIFY_URL: ${{ secrets.SLACK_NOTIFY_URL }} | |
| SLACK_NOTIFY_TOKEN: ${{ secrets.SLACK_NOTIFY_TOKEN }} | |
| run: | | |
| curl -s -d "" \ | |
| "${SLACK_NOTIFY_URL}?token=${SLACK_NOTIFY_TOKEN}&type=ci_failure&channel=alerts&workflow=${GITHUB_WORKFLOW}&repo=${GITHUB_REPOSITORY}&branch=${GITHUB_REF_NAME}&sha=${GITHUB_SHA:0:7}&run_id=${GITHUB_RUN_ID}" |