Update games announcement button title #288
Workflow file for this run
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: Run E2E Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - 'main' | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| contents: read | |
| env: | |
| XCODE_VERSION: "26.2" | |
| IOS_VERSION: "26.2" | |
| SIMULATOR_NAME: "iPhone 16" | |
| UI_TEST_CONFIGURATION: "English (Light, E2E)" | |
| E2E_SMOKE_TEST_LIST: "WikipediaUITests/E2ESmokeTests.txt" | |
| concurrency: | |
| group: "e2e-ui-tests-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| run-e2e-ui-tests: | |
| runs-on: macos-latest | |
| name: Test WikipediaUITests E2E | |
| steps: | |
| - name: Verify selected release tag | |
| if: github.event_name == 'workflow_dispatch' | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| SELECTED_REF: ${{ github.ref }} | |
| SELECTED_REF_NAME: ${{ github.ref_name }} | |
| SELECTED_REF_TYPE: ${{ github.ref_type }} | |
| run: | | |
| if [ "$SELECTED_REF_TYPE" != "tag" ]; then | |
| echo "Manual E2E UI test runs must use a tag from the 'Use workflow from' selector." | |
| echo "Selected ref: $SELECTED_REF" | |
| exit 1 | |
| fi | |
| gh release view "$SELECTED_REF_NAME" --repo "$GITHUB_REPOSITORY" >/dev/null | |
| echo "Verified GitHub release tag: $SELECTED_REF_NAME" | |
| - name: Check out selected ref | |
| uses: actions/checkout@v6 | |
| - name: Ensure UI tests use test-plan appearance and language | |
| run: scripts/lint-ui-tests.sh | |
| - name: Select Xcode | |
| run: | | |
| sudo xcode-select -switch "/Applications/Xcode_${XCODE_VERSION}.app" | |
| - name: Prepare simulator | |
| id: simulator | |
| uses: ./.github/actions/prepare-simulator | |
| with: | |
| ios-version: ${{ env.IOS_VERSION }} | |
| simulator-name: ${{ env.SIMULATOR_NAME }} | |
| - name: Run WikipediaUITests E2E | |
| run: | | |
| if [ ! -f "${E2E_SMOKE_TEST_LIST}" ]; then | |
| echo "Missing E2E smoke test list: ${E2E_SMOKE_TEST_LIST}" | |
| exit 1 | |
| fi | |
| only_testing_args=() | |
| while IFS= read -r test_identifier || [ -n "${test_identifier}" ]; do | |
| test_identifier="${test_identifier%%#*}" | |
| test_identifier="${test_identifier#"${test_identifier%%[![:space:]]*}"}" | |
| test_identifier="${test_identifier%"${test_identifier##*[![:space:]]}"}" | |
| if [ -z "${test_identifier}" ]; then | |
| continue | |
| fi | |
| only_testing_args+=("-only-testing:${test_identifier}") | |
| done < "${E2E_SMOKE_TEST_LIST}" | |
| if [ "${#only_testing_args[@]}" -eq 0 ]; then | |
| echo "No E2E smoke tests configured in ${E2E_SMOKE_TEST_LIST}." | |
| exit 1 | |
| fi | |
| echo "Running E2E WikipediaUITests ${UI_TEST_CONFIGURATION} [E2E] on ${SIMULATOR_NAME} iOS ${IOS_VERSION} with Xcode ${XCODE_VERSION}" | |
| printf 'E2E smoke selection: %s\n' "${only_testing_args[@]}" | |
| xcodebuild test \ | |
| -scheme WikipediaUITests \ | |
| -project Wikipedia.xcodeproj \ | |
| -testPlan UITests \ | |
| -only-test-configuration "${UI_TEST_CONFIGURATION}" \ | |
| "${only_testing_args[@]}" \ | |
| -destination "${{ steps.simulator.outputs.destination }}" \ | |
| -resultBundlePath "WikipediaUITests_E2E_TestResults" \ | |
| | xcpretty | |
| EXIT_CODE=${PIPESTATUS[0]} | |
| if [ "$EXIT_CODE" -ne 0 ]; then | |
| exit "$EXIT_CODE" | |
| fi | |
| - name: Upload E2E UI test result bundle | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: WikipediaUITests-E2E-TestResults | |
| path: WikipediaUITests_E2E_TestResults.xcresult | |
| if-no-files-found: ignore | |
| - name: E2E coverage summary | |
| if: success() | |
| uses: ./.github/actions/coverage-summary | |
| with: | |
| artifact-name: WikipediaUITests-E2E-coverage | |
| coverage-json-path: WikipediaUITests_E2E_coverage.json | |
| result-bundle-path: WikipediaUITests_E2E_TestResults.xcresult | |
| scheme: WikipediaUITests | |
| workflow-file: run_e2e_ui_tests.yml |