1+ ---
2+ name : UI Tests 🧪
3+
4+ on :
5+ push :
6+ branches : [main]
7+ pull_request :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ build :
15+ name : Build sample game for AltTester 🛠️
16+ runs-on : ubuntu-latest-8-cores
17+ steps :
18+ - uses : actions/checkout@v3
19+ with :
20+ lfs : true
21+ - uses : actions/cache@v3
22+ with :
23+ path : Library
24+ key : Library-${{ hashFiles('sample/Assets/**', 'sample/Packages/**', 'sample/ProjectSettings/**') }}
25+ restore-keys : |
26+ Library-
27+ - name : Build project
28+ uses : game-ci/unity-builder@v4
29+ env :
30+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
31+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
32+ UNITY_SERIAL : ${{ secrets.UNITY_SERIAL }}
33+ with :
34+ targetPlatform : StandaloneOSX
35+ projectPath : sample
36+ buildMethod : MacBuilder.BuildForAltTester
37+ customParameters : -logFile logFile.log -quit -batchmode
38+ - name : Upload artifact
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : Build-StandaloneOSX
42+ path : sample/Builds/MacOS
43+ test :
44+ name : Run UI tests on AltTester 🧪
45+ runs-on : macos-latest
46+ needs : build
47+ steps :
48+ - uses : actions/checkout@v3
49+ with :
50+ lfs : true
51+ - uses : actions/download-artifact@v4
52+ with :
53+ name : Build-StandaloneOSX
54+ - name : Open application
55+ run : |
56+ pwd
57+ ls -la
58+ export RUN_IN_BROWSERSTACK="false"
59+ export ALTSERVER_PORT=13000
60+ export ALTSERVER_HOST="159.196.149.251"
61+ chmod -R 755 SampleApp.app
62+ open SampleApp.app
63+ - uses : actions/setup-python@v4
64+ with :
65+ python-version : " 3.10"
66+ - name : Install dependencies
67+ run : pip install -r "sample/Tests/requirements.txt"
68+ - name : Run UI tests
69+ run : |
70+ export ALTSERVER_PORT=13000
71+ export ALTSERVER_HOST="159.196.149.251"
72+ pytest -s -v sample/Tests/test.py
73+
0 commit comments