<commit_before>steps:

  #
  # Build MacOS and WebGL test fixtures
  #
  - label: Build Unity 2018 MacOS and WebGL test fixtures
    key: 'cocoa-webgl-2018-fixtures'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
    commands:
      - scripts/ci-build-macos-packages.sh
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/MacOS-2018.4.36f1.zip
      - features/fixtures/maze_runner/build/WebGL-2018.4.36f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2019 MacOS and WebGL test fixtures
    key: 'cocoa-webgl-2019-fixtures'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
    commands:
      - scripts/ci-build-macos-packages.sh
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/MacOS-2019.4.34f1.zip
      - features/fixtures/maze_runner/build/WebGL-2019.4.34f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2021 MacOS and WebGL test fixtures
    key: 'cocoa-webgl-2021-fixtures'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
    commands:
      - scripts/ci-build-macos-packages.sh
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/MacOS-2021.2.7f1.zip
      - features/fixtures/maze_runner/build/WebGL-2021.2.7f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run macOS desktop tests
  #
  - label: Run MacOS e2e tests for Unity 2018
    depends_on: 'cocoa-webgl-2018-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-mac-cocoa-10.15
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/MacOS-2018.4.36f1.zip
        upload:
          - maze_output/*
          - Mazerunner.log
    commands:
      - scripts/ci-run-macos-tests.sh

  - label: Run MacOS e2e tests for Unity 2019
    depends_on: 'cocoa-webgl-2019-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-mac-cocoa-10.15
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/MacOS-2019.4.34f1.zip
        upload:
          - maze_output/*
          - Mazerunner.log
    commands:
      - scripts/ci-run-macos-tests.sh

  - label: Run MacOS e2e tests for Unity 2021
    depends_on: 'cocoa-webgl-2021-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-mac-cocoa-10.15
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/MacOS-2021.2.7f1.zip
        upload:
          - maze_output/*
          - Mazerunner.log
    commands:
      - scripts/ci-run-macos-tests.sh

  #
  # Run WebGL tests
  #
  - label: Run WebGL e2e tests for Unity 2018
    depends_on: 'cocoa-webgl-2018-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/WebGL-2018.4.36f1.zip
        upload:
          - maze_output/failed/**/*
    commands:
      - scripts/ci-run-webgl-tests.sh

  - label: Run WebGL e2e tests for Unity 2019
    depends_on: 'cocoa-webgl-2019-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/WebGL-2019.4.34f1.zip
        upload:
          - maze_output/failed/**/*
    commands:
      - scripts/ci-run-webgl-tests.sh

  - label: Run WebGL e2e tests for Unity 2021
    depends_on: 'cocoa-webgl-2021-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/WebGL-2021.2.7f1.zip
        upload:
          - maze_output/failed/**/*
    commands:
      - scripts/ci-run-webgl-tests.sh

  #
  # Build Android test fixtures
  #
  - label: ':android: Build Android test fixture for Unity 2018'
    key: 'build-android-fixture-2018'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/maze_runner/mazerunner_2018.4.36f1.apk
          - features/fixtures/unity.log
    commands:
      - rake test:android:build
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':android: Build Android test fixture for Unity 2019'
    key: 'build-android-fixture-2019'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/maze_runner/mazerunner_2019.4.34f1.apk
          - features/fixtures/unity.log
    commands:
      - rake test:android:build
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':android: Build Android test fixture for Unity 2021'
    key: 'build-android-fixture-2021'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/maze_runner/mazerunner_2021.2.7f1.apk
          - features/fixtures/unity.log
    commands:
      - rake test:android:build
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run Android tests
  #
  - label: ':android: Run Android e2e tests for Unity 2018'
    depends_on: 'build-android-fixture-2018'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2018.4.36f1.apk"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2018.4.36f1.apk"
          - "--farm=bs"
          - "--device=ANDROID_9_0"
          - "features/android"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  - label: ':android: Run Android e2e tests for Unity 2019'
    depends_on: 'build-android-fixture-2019'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2019.4.34f1.apk"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2019.4.34f1.apk"
          - "--farm=bs"
          - "--device=ANDROID_9_0"
          - "features/android"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  # TODO: PLAT-7967 Investigate failures specific to Unity 2021 on Android
  - label: ':android: Run Android e2e tests for Unity 2021'
    skip: Pending PLAT-7967
    depends_on: 'build-android-fixture-2021'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2021.2.7f1.apk"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2021.2.7f1.apk"
          - "--farm=bs"
          - "--device=ANDROID_9_0"
          - "features/android"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  #
  # Build iOS test fixtures
  #
  - label: ':ios: Generate Xcode project - Unity 2018'
    key: 'generate-fixture-project-2018'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/unity.log
          - project_2018.tgz
    commands:
      - rake test:ios:generate_xcode
      - tar -zvcf project_2018.tgz  features/fixtures/maze_runner/mazerunner_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Build iOS test fixture for Unity 2018'
    key: 'build-ios-fixture-2018'
    depends_on: 'generate-fixture-project-2018'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
          - project_2018.tgz
        upload:
          - features/fixtures/maze_runner/mazerunner_2018.4.36f1.ipa
          - features/fixtures/unity.log
    commands:
      - tar -zxf project_2018.tgz features/fixtures/maze_runner
      - rake test:ios:build_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Generate Xcode project - Unity 2019'
    key: 'generate-fixture-project-2019'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/unity.log
          - project_2019.tgz
    commands:
      - rake test:ios:generate_xcode
      - tar -zvcf project_2019.tgz features/fixtures/maze_runner/mazerunner_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Build iOS test fixture for Unity 2019'
    key: 'build-ios-fixture-2019'
    depends_on: 'generate-fixture-project-2019'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
          - project_2019.tgz
        upload:
          - features/fixtures/maze_runner/mazerunner_2019.4.34f1.ipa
          - features/fixtures/unity.log
    commands:
      - tar -zxf project_2019.tgz features/fixtures/maze_runner
      - rake test:ios:build_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Generate Xcode project - Unity 2021'
    key: 'generate-fixture-project-2021'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/unity.log
          - project_2021.tgz
    commands:
      - rake test:ios:generate_xcode
      - tar -zvcf project_2021.tgz features/fixtures/maze_runner/mazerunner_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Build iOS test fixture for Unity 2021'
    key: 'build-ios-fixture-2021'
    depends_on: 'generate-fixture-project-2021'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
          - project_2021.tgz
        upload:
          - features/fixtures/maze_runner/mazerunner_2021.2.7f1.ipa
          - features/fixtures/unity.log
    commands:
      - tar -zxf project_2021.tgz features/fixtures/maze_runner
      - rake test:ios:build_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run iOS tests
  #
  - label: ':ios: Run iOS e2e tests for Unity 2018'
    depends_on: 'build-ios-fixture-2018'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2018.4.36f1.ipa"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2018.4.36f1.ipa"
          - "--farm=bs"
          - "--device=IOS_14"
          - "--fail-fast"
          - "features/ios"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  - label: ':ios: Run iOS e2e tests for Unity 2019'
    depends_on: 'build-ios-fixture-2019'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2019.4.34f1.ipa"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2019.4.34f1.ipa"
          - "--farm=bs"
          - "--device=IOS_14"
          - "--fail-fast"
          - "features/ios"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  - label: ':ios: Run iOS e2e tests for Unity 2021'
    depends_on: 'build-ios-fixture-2021'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2021.2.7f1.ipa"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2021.2.7f1.ipa"
          - "--farm=bs"
          - "--device=IOS_14"
          - "--fail-fast"
          - "features/ios"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  #
  # Build Windows test fixtures
  #
  - label: Build Unity 2018 Windows test fixture
    key: 'windows-2018-fixture'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2018.4.36f1"
    command:
      - scripts/ci-build-windows-package.bat
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/Windows-2018.4.36f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2019 Windows test fixture
    key: 'windows-2019-fixture'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2019.4.34f1"
    command:
      - scripts/ci-build-windows-package.bat
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/Windows-2019.4.34f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2021 Windows test fixture
    key: 'windows-2021-fixture'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2021.2.7f1"
    commands:
      - scripts/ci-build-windows-package.bat
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/Windows-2021.2.7f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run Windows e2e tests
  #
  - label: Run Windows e2e tests for Unity 2018
    depends_on: 'windows-2018-fixture'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2018.4.36f1"
    command:
      - scripts/ci-run-windows-tests.bat
    artifact_paths:
      - maze_output/failed/**/*

  - label: Run Windows e2e tests for Unity 2019
    depends_on: 'windows-2019-fixture'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2019.4.34f1"
    command:
      - scripts/ci-run-windows-tests.bat
    artifact_paths:
      - maze_output/failed/**/*

  - label: Run Windows e2e tests for Unity 2021
    depends_on: 'windows-2021-fixture'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2021.2.7f1"
    command:
      - scripts/ci-run-windows-tests.bat
    artifact_paths:
      - maze_output/failed/**/*
<commit_msg>[full ci]<commit_after>steps:

  # Build MacOS and WebGL test fixtures
  #
  - label: Build Unity 2018 MacOS and WebGL test fixtures
    key: 'cocoa-webgl-2018-fixtures'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
    commands:
      - scripts/ci-build-macos-packages.sh
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/MacOS-2018.4.36f1.zip
      - features/fixtures/maze_runner/build/WebGL-2018.4.36f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2019 MacOS and WebGL test fixtures
    key: 'cocoa-webgl-2019-fixtures'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
    commands:
      - scripts/ci-build-macos-packages.sh
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/MacOS-2019.4.34f1.zip
      - features/fixtures/maze_runner/build/WebGL-2019.4.34f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2021 MacOS and WebGL test fixtures
    key: 'cocoa-webgl-2021-fixtures'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
    commands:
      - scripts/ci-build-macos-packages.sh
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/MacOS-2021.2.7f1.zip
      - features/fixtures/maze_runner/build/WebGL-2021.2.7f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run macOS desktop tests
  #
  - label: Run MacOS e2e tests for Unity 2018
    depends_on: 'cocoa-webgl-2018-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-mac-cocoa-10.15
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/MacOS-2018.4.36f1.zip
        upload:
          - maze_output/*
          - Mazerunner.log
    commands:
      - scripts/ci-run-macos-tests.sh

  - label: Run MacOS e2e tests for Unity 2019
    depends_on: 'cocoa-webgl-2019-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-mac-cocoa-10.15
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/MacOS-2019.4.34f1.zip
        upload:
          - maze_output/*
          - Mazerunner.log
    commands:
      - scripts/ci-run-macos-tests.sh

  - label: Run MacOS e2e tests for Unity 2021
    depends_on: 'cocoa-webgl-2021-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-mac-cocoa-10.15
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/MacOS-2021.2.7f1.zip
        upload:
          - maze_output/*
          - Mazerunner.log
    commands:
      - scripts/ci-run-macos-tests.sh

  #
  # Run WebGL tests
  #
  - label: Run WebGL e2e tests for Unity 2018
    depends_on: 'cocoa-webgl-2018-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/WebGL-2018.4.36f1.zip
        upload:
          - maze_output/failed/**/*
    commands:
      - scripts/ci-run-webgl-tests.sh

  - label: Run WebGL e2e tests for Unity 2019
    depends_on: 'cocoa-webgl-2019-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/WebGL-2019.4.34f1.zip
        upload:
          - maze_output/failed/**/*
    commands:
      - scripts/ci-run-webgl-tests.sh

  - label: Run WebGL e2e tests for Unity 2021
    depends_on: 'cocoa-webgl-2021-fixtures'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - features/fixtures/maze_runner/build/WebGL-2021.2.7f1.zip
        upload:
          - maze_output/failed/**/*
    commands:
      - scripts/ci-run-webgl-tests.sh

  #
  # Build Android test fixtures
  #
  - label: ':android: Build Android test fixture for Unity 2018'
    key: 'build-android-fixture-2018'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/maze_runner/mazerunner_2018.4.36f1.apk
          - features/fixtures/unity.log
    commands:
      - rake test:android:build
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':android: Build Android test fixture for Unity 2019'
    key: 'build-android-fixture-2019'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/maze_runner/mazerunner_2019.4.34f1.apk
          - features/fixtures/unity.log
    commands:
      - rake test:android:build
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':android: Build Android test fixture for Unity 2021'
    key: 'build-android-fixture-2021'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/maze_runner/mazerunner_2021.2.7f1.apk
          - features/fixtures/unity.log
    commands:
      - rake test:android:build
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run Android tests
  #
  - label: ':android: Run Android e2e tests for Unity 2018'
    depends_on: 'build-android-fixture-2018'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2018.4.36f1.apk"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2018.4.36f1.apk"
          - "--farm=bs"
          - "--device=ANDROID_9_0"
          - "features/android"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  - label: ':android: Run Android e2e tests for Unity 2019'
    depends_on: 'build-android-fixture-2019'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2019.4.34f1.apk"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2019.4.34f1.apk"
          - "--farm=bs"
          - "--device=ANDROID_9_0"
          - "features/android"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  # TODO: PLAT-7967 Investigate failures specific to Unity 2021 on Android
  - label: ':android: Run Android e2e tests for Unity 2021'
    skip: Pending PLAT-7967
    depends_on: 'build-android-fixture-2021'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2021.2.7f1.apk"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2021.2.7f1.apk"
          - "--farm=bs"
          - "--device=ANDROID_9_0"
          - "features/android"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  #
  # Build iOS test fixtures
  #
  - label: ':ios: Generate Xcode project - Unity 2018'
    key: 'generate-fixture-project-2018'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/unity.log
          - project_2018.tgz
    commands:
      - rake test:ios:generate_xcode
      - tar -zvcf project_2018.tgz  features/fixtures/maze_runner/mazerunner_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Build iOS test fixture for Unity 2018'
    key: 'build-ios-fixture-2018'
    depends_on: 'generate-fixture-project-2018'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2018.4.36f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
          - project_2018.tgz
        upload:
          - features/fixtures/maze_runner/mazerunner_2018.4.36f1.ipa
          - features/fixtures/unity.log
    commands:
      - tar -zxf project_2018.tgz features/fixtures/maze_runner
      - rake test:ios:build_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Generate Xcode project - Unity 2019'
    key: 'generate-fixture-project-2019'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/unity.log
          - project_2019.tgz
    commands:
      - rake test:ios:generate_xcode
      - tar -zvcf project_2019.tgz features/fixtures/maze_runner/mazerunner_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Build iOS test fixture for Unity 2019'
    key: 'build-ios-fixture-2019'
    depends_on: 'generate-fixture-project-2019'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2019.4.34f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
          - project_2019.tgz
        upload:
          - features/fixtures/maze_runner/mazerunner_2019.4.34f1.ipa
          - features/fixtures/unity.log
    commands:
      - tar -zxf project_2019.tgz features/fixtures/maze_runner
      - rake test:ios:build_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Generate Xcode project - Unity 2021'
    key: 'generate-fixture-project-2021'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
        upload:
          - features/fixtures/unity.log
          - project_2021.tgz
    commands:
      - rake test:ios:generate_xcode
      - tar -zvcf project_2021.tgz features/fixtures/maze_runner/mazerunner_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: ':ios: Build iOS test fixture for Unity 2021'
    key: 'build-ios-fixture-2021'
    depends_on: 'generate-fixture-project-2021'
    timeout_in_minutes: 30
    agents:
      queue: opensource-arm-mac-cocoa-12
    env:
      UNITY_VERSION: "2021.2.7f1"
    plugins:
      artifacts#v1.2.0:
        download:
          - Bugsnag.unitypackage
          - project_2021.tgz
        upload:
          - features/fixtures/maze_runner/mazerunner_2021.2.7f1.ipa
          - features/fixtures/unity.log
    commands:
      - tar -zxf project_2021.tgz features/fixtures/maze_runner
      - rake test:ios:build_xcode
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run iOS tests
  #
  - label: ':ios: Run iOS e2e tests for Unity 2018'
    depends_on: 'build-ios-fixture-2018'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2018.4.36f1.ipa"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2018.4.36f1.ipa"
          - "--farm=bs"
          - "--device=IOS_14"
          - "--fail-fast"
          - "features/ios"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  - label: ':ios: Run iOS e2e tests for Unity 2019'
    depends_on: 'build-ios-fixture-2019'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2019.4.34f1.ipa"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2019.4.34f1.ipa"
          - "--farm=bs"
          - "--device=IOS_14"
          - "--fail-fast"
          - "features/ios"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  - label: ':ios: Run iOS e2e tests for Unity 2021'
    depends_on: 'build-ios-fixture-2021'
    timeout_in_minutes: 30
    agents:
      queue: opensource
    plugins:
      artifacts#v1.3.0:
        download:
          - "features/fixtures/maze_runner/mazerunner_2021.2.7f1.ipa"
        upload:
          - "maze_output/failed/**/*"
      docker-compose#v3.7.0:
        pull: maze-runner
        run: maze-runner
        command:
          - "--app=/app/features/fixtures/maze_runner/mazerunner_2021.2.7f1.ipa"
          - "--farm=bs"
          - "--device=IOS_14"
          - "--fail-fast"
          - "features/ios"
    concurrency: 9
    concurrency_group: browserstack-app
    concurrency_method: eager

  #
  # Build Windows test fixtures
  #
  - label: Build Unity 2018 Windows test fixture
    key: 'windows-2018-fixture'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2018.4.36f1"
    command:
      - scripts/ci-build-windows-package.bat
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/Windows-2018.4.36f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2019 Windows test fixture
    key: 'windows-2019-fixture'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2019.4.34f1"
    command:
      - scripts/ci-build-windows-package.bat
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/Windows-2019.4.34f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  - label: Build Unity 2021 Windows test fixture
    key: 'windows-2021-fixture'
    depends_on: 'build-artifacts'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2021.2.7f1"
    commands:
      - scripts/ci-build-windows-package.bat
    artifact_paths:
      - unity.log
      - features/fixtures/maze_runner/build/Windows-2021.2.7f1.zip
    retry:
      automatic:
        - exit_status: -1  # Agent was lost
          limit: 1
        - exit_status: 255 # Forced agent shutdown (e.g. timeout)
          limit: 1

  #
  # Run Windows e2e tests
  #
  - label: Run Windows e2e tests for Unity 2018
    depends_on: 'windows-2018-fixture'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2018.4.36f1"
    command:
      - scripts/ci-run-windows-tests.bat
    artifact_paths:
      - maze_output/failed/**/*

  - label: Run Windows e2e tests for Unity 2019
    depends_on: 'windows-2019-fixture'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2019.4.34f1"
    command:
      - scripts/ci-run-windows-tests.bat
    artifact_paths:
      - maze_output/failed/**/*

  - label: Run Windows e2e tests for Unity 2021
    depends_on: 'windows-2021-fixture'
    timeout_in_minutes: 30
    agents:
      queue: opensource-windows-unity
    env:
      UNITY_VERSION: "2021.2.7f1"
    command:
      - scripts/ci-run-windows-tests.bat
    artifact_paths:
      - maze_output/failed/**/*

{'fraction_non_alphanumeric': 0.10519528371407516, 'fraction_numerical': 0.05605853247710285, 'mean_word_length': 1.9752564403727195, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 48, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '94019', 'n_tokens_mistral': 14590, 'n_tokens_neox': 13054, 'n_words': 2481}