Download tests for c51c101092b97977a46694a978ff3a390e2f3801 #336
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 download-link tests on live infra | |
| name: Download tests | |
| run-name: Download 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: "15 14 * * *" # 2:15 PM UTC daily | |
| workflow_dispatch: | |
| inputs: | |
| springfield_service_hostname: | |
| description: The root URL of the service to run tests against. eg 'https://www.firefox.com' | |
| required: true | |
| jobs: | |
| notify-of-test-run-start: | |
| if: github.repository == 'mozmeao/springfield' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Notify via Slack that tests are starting | |
| uses: ./.github/actions/slack | |
| with: | |
| env_name: test | |
| label: "Download tests [${{ github.sha }}]" | |
| status: info | |
| channel_id: ${{ env.SLACK_CHANNEL_ID }} | |
| slack_bot_token: ${{ env.SLACK_BOT_TOKEN }} | |
| ref: ${{ github.sha }} | |
| message: "Download tests started" | |
| download-tests: | |
| runs-on: ubuntu-latest | |
| needs: notify-of-test-run-start | |
| env: | |
| BASE_URL: ${{ github.event.inputs.springfield_service_hostname || 'https://www.firefox.com' }} # Firefox.com base URL | |
| BROWSER_NAME: "" | |
| CI_JOB_ID: ${{ github.run_id }} | |
| DRIVER: "" | |
| LABEL: test-downloads | |
| MARK_EXPRESSION: download | |
| PYTEST_PROCESSES: auto | |
| SAUCELABS_API_KEY: "" | |
| SAUCELABS_USERNAME: "" | |
| # 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@v5 | |
| - name: Run functional download tests | |
| run: ./bin/integration_tests/functional_tests.sh | |
| env: | |
| TEST_IMAGE: mozmeao/springfield_test:latest | |
| - name: Cleanup after functional download tests | |
| if: always() | |
| run: ./bin/integration_tests/cleanup_after_functional_tests.sh | |
| - name: Store artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| 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: github.repository == 'mozmeao/springfield' && always() | |
| runs-on: ubuntu-latest | |
| needs: [notify-of-test-run-start, download-tests] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Notify via Slack of test-run outcome | |
| uses: ./.github/actions/slack | |
| with: | |
| env_name: test | |
| label: "Download tests [${{ github.sha }}]" | |
| status: ${{ needs.download-tests.result }} | |
| channel_id: ${{ env.SLACK_CHANNEL_ID }} | |
| slack_bot_token: ${{ env.SLACK_BOT_TOKEN }} | |
| ref: ${{ github.sha }} | |
| message: "Download tests completed. Status: ${{ needs.download-tests.result }}" |