diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 394024e6..4b2a4adb 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -12,63 +12,63 @@ concurrency: cancel-in-progress: true jobs: - test: - if: github.event.pull_request.head.repo.fork == false - name: Test sample app - runs-on: ubuntu-latest-8-cores - - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - run: git lfs pull - - - uses: game-ci/unity-test-runner@v4 - id: passportTest - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - with: - unityVersion: 2021.3.26f1 - projectPath: './sample' - githubToken: ${{ secrets.GITHUB_TOKEN }} - testMode: 'EditMode' - - uses: actions/upload-artifact@v4 - if: always() - with: - name: Test results - path: ${{ steps.passportTest.outputs.artifactsPath }} - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: Coverage results - path: ${{ steps.passportTest.outputs.coveragePath }} +# test: +# if: github.event.pull_request.head.repo.fork == false +# name: Test sample app +# runs-on: ubuntu-latest-8-cores +# +# steps: +# - uses: actions/checkout@v3 +# with: +# lfs: true +# - run: git lfs pull +# +# - uses: game-ci/unity-test-runner@v4 +# id: passportTest +# env: +# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} +# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} +# UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} +# with: +# unityVersion: 2021.3.26f1 +# projectPath: './sample' +# githubToken: ${{ secrets.GITHUB_TOKEN }} +# testMode: 'EditMode' +# - uses: actions/upload-artifact@v4 +# if: always() +# with: +# name: Test results +# path: ${{ steps.passportTest.outputs.artifactsPath }} +# +# - uses: actions/upload-artifact@v4 +# if: always() +# with: +# name: Coverage results +# path: ${{ steps.passportTest.outputs.coveragePath }} build: needs: test - name: Build for ${{ matrix.targetPlatform }} + name: Build for ${{ matrix.targetPlatform }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: include: - - targetPlatform: iOS - os: macos-latest - - targetPlatform: Android - os: macos-latest - - targetPlatform: WebGL - os: macos-latest +# - targetPlatform: iOS +# os: macos-latest +# - targetPlatform: Android +# os: macos-latest +# - targetPlatform: WebGL +# os: macos-latest - targetPlatform: StandaloneOSX os: macos-latest - - targetPlatform: iOS - os: windows-latest - - targetPlatform: Android - os: windows-latest - - targetPlatform: WebGL - os: windows-latest - - targetPlatform: StandaloneWindows64 - os: windows-latest +# - targetPlatform: iOS +# os: windows-latest +# - targetPlatform: Android +# os: windows-latest +# - targetPlatform: WebGL +# os: windows-latest +# - targetPlatform: StandaloneWindows64 +# os: windows-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index daff3c19..698cf952 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -1,135 +1,135 @@ ---- -name: UI Tests 🧪 - -on: - push: - branches: [main] - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - name: Build ${{ matrix.targetPlatform }} for AltTester 🛠️ - runs-on: ubuntu-latest-8-cores - strategy: - fail-fast: false - matrix: - include: - - targetPlatform: StandaloneOSX - buildMethod: MacBuilder.BuildForAltTester - buildPath: sample/Builds/MacOS - - targetPlatform: StandaloneWindows64 - buildMethod: WindowsBuilder.BuildForAltTester - buildPath: sample/Builds/Windows64 - - targetPlatform: Android - buildMethod: MobileBuilder.BuildForAltTester - buildPath: sample/Builds/Android - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - uses: actions/cache@v3 - with: - path: Library - key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('sample/Assets/**', 'sample/Packages/**', 'sample/ProjectSettings/**') }} - restore-keys: | - Library-${{ matrix.targetPlatform }} - Library- - - name: Build project - uses: game-ci/unity-builder@v4 - env: - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} - with: - targetPlatform: ${{ matrix.targetPlatform }} - projectPath: sample - buildMethod: ${{ matrix.buildMethod }} - customParameters: -logFile logFile.log -quit -batchmode - - name: List build directory - run: ls -R ./ - - name: Upload artifact - uses: actions/upload-artifact@v4 - if: always() - with: - name: Build-${{ matrix.targetPlatform }} - path: ${{ matrix.buildPath }} - test: - name: Run ${{ matrix.targetPlatform }} UI tests 🧪 - needs: build - strategy: - matrix: - include: - - targetPlatform: StandaloneOSX - runs-on: [self-hosted, macOS] - test_script: pytest -xs test/test_mac.py::MacTest - - targetPlatform: StandaloneWindows64 - runs-on: [self-hosted, windows] - test_script: pytest -xs test/test_windows.py::WindowsTest - - targetPlatform: Android - runs-on: [ self-hosted, macOS ] - test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml" - concurrency: - group: test-${{ matrix.targetPlatform }} - runs-on: ${{ matrix.runs-on }} - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - uses: actions/download-artifact@v4 - with: - name: Build-${{ matrix.targetPlatform }} - path: sample/Tests - - name: Make macOS artifact executable - if: ${{ matrix.targetPlatform == 'StandaloneOSX' }} - run: chmod +x sample/Tests/SampleApp.app/Contents/MacOS/* - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies (Windows) - if: ${{ matrix.targetPlatform == 'StandaloneWindows64' }} - run: pip install -r "sample/Tests/requirements-desktop.txt" - - name: Install dependencies (Mac) - if: ${{ matrix.targetPlatform != 'StandaloneWindows64' }} - run: | - if [[ "${{ matrix.targetPlatform }}" == "StandaloneOSX" ]]; then - pip uninstall -y browserstack-sdk || true - pip install -r "sample/Tests/requirements-desktop.txt" - else - pip install -r "sample/Tests/requirements-mobile.txt" - fi - - name: Run UI tests - env: - UNITY_APP_PATH: SampleApp.app - UNITY_APP_NAME: SampleApp - MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - working-directory: sample/Tests - run: ${{ matrix.test_script }} - test-ios: - name: Run iOS UI tests 🧪 - runs-on: [ self-hosted, macOS ] - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - name: Build iOS app - working-directory: sample - run: ./build_ios.sh - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - name: Install dependencies - run: pip install -r "sample/Tests/requirements-mobile.txt" - - name: Run UI tests - env: - MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - working-directory: sample/Tests - run: browserstack-sdk pytest -s ./test/test_ios.py --browserstack.config "browserstack.ios.yml" - \ No newline at end of file +#--- +#name: UI Tests 🧪 +# +#on: +# push: +# branches: [main] +# pull_request: +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# build: +# name: Build ${{ matrix.targetPlatform }} for AltTester 🛠️ +# runs-on: ubuntu-latest-8-cores +# strategy: +# fail-fast: false +# matrix: +# include: +# - targetPlatform: StandaloneOSX +# buildMethod: MacBuilder.BuildForAltTester +# buildPath: sample/Builds/MacOS +# - targetPlatform: StandaloneWindows64 +# buildMethod: WindowsBuilder.BuildForAltTester +# buildPath: sample/Builds/Windows64 +# - targetPlatform: Android +# buildMethod: MobileBuilder.BuildForAltTester +# buildPath: sample/Builds/Android +# steps: +# - uses: actions/checkout@v3 +# with: +# lfs: true +# - uses: actions/cache@v3 +# with: +# path: Library +# key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('sample/Assets/**', 'sample/Packages/**', 'sample/ProjectSettings/**') }} +# restore-keys: | +# Library-${{ matrix.targetPlatform }} +# Library- +# - name: Build project +# uses: game-ci/unity-builder@v4 +# env: +# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} +# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} +# UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} +# with: +# targetPlatform: ${{ matrix.targetPlatform }} +# projectPath: sample +# buildMethod: ${{ matrix.buildMethod }} +# customParameters: -logFile logFile.log -quit -batchmode +# - name: List build directory +# run: ls -R ./ +# - name: Upload artifact +# uses: actions/upload-artifact@v4 +# if: always() +# with: +# name: Build-${{ matrix.targetPlatform }} +# path: ${{ matrix.buildPath }} +# test: +# name: Run ${{ matrix.targetPlatform }} UI tests 🧪 +# needs: build +# strategy: +# matrix: +# include: +# - targetPlatform: StandaloneOSX +# runs-on: [self-hosted, macOS] +# test_script: pytest -xs test/test_mac.py::MacTest +# - targetPlatform: StandaloneWindows64 +# runs-on: [self-hosted, windows] +# test_script: pytest -xs test/test_windows.py::WindowsTest +# - targetPlatform: Android +# runs-on: [ self-hosted, macOS ] +# test_script: browserstack-sdk pytest -s ./test/test_android.py --browserstack.config "browserstack.android.yml" +# concurrency: +# group: test-${{ matrix.targetPlatform }} +# runs-on: ${{ matrix.runs-on }} +# steps: +# - uses: actions/checkout@v3 +# with: +# lfs: true +# - uses: actions/download-artifact@v4 +# with: +# name: Build-${{ matrix.targetPlatform }} +# path: sample/Tests +# - name: Make macOS artifact executable +# if: ${{ matrix.targetPlatform == 'StandaloneOSX' }} +# run: chmod +x sample/Tests/SampleApp.app/Contents/MacOS/* +# - uses: actions/setup-python@v4 +# with: +# python-version: "3.10" +# - name: Install dependencies (Windows) +# if: ${{ matrix.targetPlatform == 'StandaloneWindows64' }} +# run: pip install -r "sample/Tests/requirements-desktop.txt" +# - name: Install dependencies (Mac) +# if: ${{ matrix.targetPlatform != 'StandaloneWindows64' }} +# run: | +# if [[ "${{ matrix.targetPlatform }}" == "StandaloneOSX" ]]; then +# pip uninstall -y browserstack-sdk || true +# pip install -r "sample/Tests/requirements-desktop.txt" +# else +# pip install -r "sample/Tests/requirements-mobile.txt" +# fi +# - name: Run UI tests +# env: +# UNITY_APP_PATH: SampleApp.app +# UNITY_APP_NAME: SampleApp +# MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} +# BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} +# BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} +# working-directory: sample/Tests +# run: ${{ matrix.test_script }} +# test-ios: +# name: Run iOS UI tests 🧪 +# runs-on: [ self-hosted, macOS ] +# steps: +# - uses: actions/checkout@v3 +# with: +# lfs: true +# - name: Build iOS app +# working-directory: sample +# run: ./build_ios.sh +# - uses: actions/setup-python@v4 +# with: +# python-version: "3.10" +# - name: Install dependencies +# run: pip install -r "sample/Tests/requirements-mobile.txt" +# - name: Run UI tests +# env: +# MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} +# BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} +# BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} +# working-directory: sample/Tests +# run: browserstack-sdk pytest -s ./test/test_ios.py --browserstack.config "browserstack.ios.yml" +# \ No newline at end of file