Experiment Smoke tests for fx-backup-stage-rollout #370
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: Linux Klaatu Tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Experiment Branch' | |
| default: "['control']" | |
| required: true | |
| type: string | |
| slug: | |
| description: 'Experiment Slug' | |
| default: 'an-awesome-experiment' | |
| required: true | |
| type: string | |
| experiment-server: | |
| description: 'Experimenter Server' | |
| default: 'prod' | |
| required: false | |
| type: choice | |
| options: | |
| - stage | |
| - stage/preview | |
| - prod | |
| firefox-version: | |
| description: 'The Firefox Version(s) you want to test' | |
| default: "['latest-beta', 'latest', '123.0']" | |
| required: false | |
| type: string | |
| feature-name: | |
| description: 'The Feature you want to test' | |
| default: 'smoke' | |
| required: false | |
| type: choice | |
| options: | |
| - smoke | |
| extra-arguments: | |
| description: 'Additional testing arguments' | |
| default: '' | |
| required: false | |
| type: string | |
| run-name: Experiment Smoke tests for ${{ inputs.slug }} | |
| jobs: | |
| klaatu-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| firefox: ${{ fromJSON(inputs.firefox-version) }} | |
| branch: ${{ fromJSON(inputs.branch) }} | |
| name: Smoke tests on linux for slug ${{ inputs.slug }} on firefox v${{ matrix.firefox }} branch ${{ matrix.branch }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup firefox | |
| id: setup-firefox | |
| uses: browser-actions/setup-firefox@v1 | |
| with: | |
| firefox-version: ${{ matrix.firefox }} | |
| - run: | | |
| echo Installed firefox versions: ${{ steps.setup-firefox.outputs.firefox-version }} | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Setup tests | |
| shell: bash | |
| run: ./setup_script.sh | |
| - name: Create SSL Certificate Files | |
| run: | | |
| openssl req -x509 -newkey rsa:2048 -keyout search_files/server.key -out search_files/server.cert -days 365 -nodes -subj "/CN=localhost" | |
| - name: Install xvfb | |
| run: sudo apt-get update && sudo apt-get install -y xvfb | |
| - name: Run Tests | |
| timeout-minutes: 120 | |
| run: | | |
| xvfb-run -a tox -e bdd-tests -- --experiment-branch ${{ matrix.branch }} --experiment-slug ${{ inputs.slug }} --experiment-server ${{inputs.experiment-server}} --private-browsing-enabled --firefox-path="/opt/hostedtoolcache/firefox/${{ matrix.firefox }}/x64/firefox" ${{ inputs.extra-arguments }} | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ always() }} | |
| with: | |
| name: ${{ inputs.slug }} HTML Test Report on firefox v${{ matrix.firefox }} branch ${{ matrix.branch }} | |
| path: /home/runner/work/klaatu/klaatu/tests/report.html |