Merge pull request #334 from immutable/feat/update-zkevm-api-2024-10-… #97
This file contains 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: UI Tests 🧪 | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build sample game for AltTester 🛠️ | |
runs-on: ubuntu-latest-8-cores | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-${{ hashFiles('sample/Assets/**', 'sample/Packages/**', 'sample/ProjectSettings/**') }} | |
restore-keys: | | |
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: StandaloneOSX | |
projectPath: sample | |
buildMethod: MacBuilder.BuildForAltTester | |
customParameters: -logFile logFile.log -quit -batchmode | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Build-StandaloneOSX | |
path: sample/Builds/MacOS | |
test: | |
name: Run UI tests on AltTester 🧪 | |
runs-on: self-hosted | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- uses: actions/download-artifact@v4 | |
with: | |
name: Build-StandaloneOSX | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: pip install -r "sample/Tests/requirements.txt" | |
- name: Run UI tests | |
env: | |
UNITY_APP_PATH: ${{ github.workspace }}/SampleApp.app | |
UNITY_APP_NAME: SampleApp | |
MAILSLURP_API_KEY: ${{ secrets.MAILSLURP_API_KEY }} | |
working-directory: sample/Tests | |
run: | | |
chmod -R 755 ${{ github.workspace }}/SampleApp.app | |
chmod +x test_mac.sh | |
./test_mac.sh | |