CDN tests for ce6e0ad103c2a0987cf89473aca69c3a35c36aea #1079
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
| # Workflow that runs CDN and SSL tests on live infra | |
| name: CDN tests | |
| run-name: CDN tests for ${{ github.sha }} | |
| env: | |
| SLACK_CHANNEL_ID: CBX0KH5GA # #www-notify in MoCo Slack | |
| SLACK_BOT_TOKEN: ${{secrets.SLACK_BOT_TOKEN_FOR_MEAO_NOTIFICATIONS_APP}} | |
| on: | |
| schedule: | |
| - cron: "5 11 * * *" # 11:05 AM UTC daily | |
| workflow_dispatch: | |
| inputs: | |
| mozorg_service_hostname: | |
| description: The root URL of the Mozorg service to run tests against. eg 'https://www.mozilla.org' | |
| required: true | |
| concurrency: | |
| group: cdn-tests | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| notify-of-test-run-start: | |
| if: github.repository == 'mozilla/bedrock' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: .github/actions/slack | |
| - name: Notify via Slack that tests are starting | |
| uses: ./.github/actions/slack | |
| with: | |
| env_name: test | |
| label: "CDN tests [${{ github.sha }}]" | |
| status: info | |
| channel_id: ${{ env.SLACK_CHANNEL_ID }} | |
| slack_bot_token: ${{ env.SLACK_BOT_TOKEN }} | |
| ref: ${{ github.sha }} | |
| message: "CDN tests started" | |
| cdn-tests: | |
| if: github.repository == 'mozilla/bedrock' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - LABEL: "CDN check" | |
| SHARD_LABEL: cdn | |
| MARK_EXPRESSION: "cdn and not cdnssl" | |
| - LABEL: "SSL scan" | |
| SHARD_LABEL: ssl | |
| MARK_EXPRESSION: "cdnssl" | |
| env: | |
| BASE_URL: ${{ github.event.inputs.mozorg_service_hostname || 'https://www.mozilla.org' }} # Mozorg base URL | |
| BROWSER_NAME: "" | |
| CI_JOB_ID: ${{ github.run_id }} | |
| DRIVER: "" | |
| LABEL: ${{ matrix.LABEL }} | |
| MARK_EXPRESSION: ${{ matrix.MARK_EXPRESSION }} | |
| PYTEST_PROCESSES: 1 | |
| SAUCELABS_API_KEY: "" | |
| SAUCELABS_USERNAME: "" | |
| RERUNS_ALLOWED: 3 | |
| RERUNS_DELAY_SECS: 60 | |
| # Note we use if: always() below to keep things going, rather than | |
| # continue-on-error, because that approach falsely marks the overall | |
| # test suite as green/passed even if it has some failures. | |
| steps: | |
| - name: Fetch codebase | |
| uses: actions/checkout@v6 | |
| - name: Run CDN tests | |
| run: ./bin/integration_tests/functional_tests.sh | |
| env: | |
| TEST_IMAGE: mozmeao/bedrock_test:latest | |
| - name: Cleanup CDN tests | |
| if: always() | |
| run: ./bin/integration_tests/cleanup_after_functional_tests.sh | |
| - name: Store artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: test-results-${{github.run_id}}-${{ matrix.SHARD_LABEL }} | |
| path: results-${{github.run_id}} | |
| if-no-files-found: ignore # this avoids a false "Warning" if there were no issues | |
| notify-of-test-run-completion: | |
| if: always() | |
| needs: cdn-tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout: .github/actions/slack | |
| - name: Notify via Slack of test-run outcome | |
| uses: ./.github/actions/slack | |
| with: | |
| env_name: test | |
| label: "CDN tests [${{ github.sha }}]" | |
| status: ${{ needs.cdn-tests.result }} | |
| channel_id: ${{ env.SLACK_CHANNEL_ID }} | |
| slack_bot_token: ${{ env.SLACK_BOT_TOKEN }} | |
| ref: ${{ github.sha }} | |
| message: "CDN tests completed. Status: ${{ needs.cdn-tests.result }}" |