-
Notifications
You must be signed in to change notification settings - Fork 7
72 lines (68 loc) · 2.03 KB
/
ui-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
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: macos-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/download-artifact@v4
with:
name: Build-StandaloneOSX
- name: Open application
run: |
export RUN_IN_BROWSERSTACK="false"
export ALTSERVER_HOST="54.66.58.33"
export ALTSERVER_PORT=13000
chmod -R 755 SampleApp.app
codesign --deep -s - -f SampleApp.app
open SampleApp.app
- 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
run: |
export ALTSERVER_HOST="54.66.58.33"
export ALTSERVER_PORT=13000
pytest -s -v sample/Tests/test.py