forked from Tencent/puerts
-
Notifications
You must be signed in to change notification settings - Fork 0
206 lines (196 loc) · 5.99 KB
/
unity_unittest.yml
File metadata and controls
206 lines (196 loc) · 5.99 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: unity unittest
on:
workflow_dispatch:
push:
paths:
- unity/Assets/**
- unity/test/**
- unity/native/**
- unity/cli/**
- unreal/Puerts/Source/JsEnv/Private/V8InspectorImpl.cpp
- unreal/Puerts/Source/JsEnv/Private/V8InspectorImpl.h
- unreal/Puerts/Source/JsEnv/Private/WebSocketImpl.cpp
- unreal/Puerts/Source/JsEnv/Private/PromiseRejectCallback.hpp
- .github/workflows/unity_unittest.yml
- .github/workflows/composites/**
pull_request:
paths:
- unity/Assets/**
- unity/test/**
- unity/native/**
- unity/cli/**
- unreal/Puerts/Source/JsEnv/Private/V8InspectorImpl.cpp
- unreal/Puerts/Source/JsEnv/Private/V8InspectorImpl.h
- unreal/Puerts/Source/JsEnv/Private/WebSocketImpl.cpp
- unreal/Puerts/Source/JsEnv/Private/PromiseRejectCallback.hpp
- .github/workflows/unity_unittest.yml
- .github/workflows/composites/**
# branches-ignore:
# - 'unity-3.0.0'
env:
RUNID: 613573412
jobs:
# unittest-win-unity:
# runs-on: windows-2022
#
# steps:
# - uses: actions/checkout@v3
# - name: Setup Unity
# uses: ./.github/workflows/composites/unity-setup/
# with:
# os: 'win'
# version: '2022.3.59f1'
# cachekey: 'unity2022x64'
# install_path: C:/UNITY
# unity_modules: windows-il2cpp
# UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
# - name: UnitTest
# run: |
# cd unity
# npm i
# cd test/unity
# node ../../cli unity-test --unity C:/UNITY/2022.3.59f1/Editor/Unity.exe
# - name: TestResult
## if: always()
# shell: bash
# run: |
# cd unity/test/unity
# echo "testresult in v2(reflection)"
# cat log2.txt | grep "Failed\|Passed"
# echo "testresult in v2"
# cat log3.txt | grep "Failed\|Passed"
unittest-osx-unity:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: RageAgainstThePixel/unity-setup@v1
with:
unity-version: 2022.3.59f1
build-targets: StandaloneOSX
modules: mac-il2cpp
#version-file: 'unity/test/unity/ProjectSettings/ProjectVersion.txt'
- uses: RageAgainstThePixel/activate-unity-license@v1
with:
license: 'Personal'
username: ${{ secrets.UNITY_USERNAME }}
password: ${{ secrets.UNITY_PASSWORD }}
#serial: ${{ secrets.UNITY_SERIAL }}
- name: UnitTest
run: |
cd unity
npm i
cd test/unity
node ../../cli unity-test --unity ${{ env.UNITY_EDITOR_PATH }}
- name: TestResult
# if: always()
shell: bash
run: |
cd unity/test/unity
log_files=(
"log_reflection.txt"
"log_qjs_reflection.txt"
"log_nodejs_reflection.txt"
"log_minimum_reflection.txt"
"log_qjs_minimum_reflection.txt"
"log_nodejs_minimum_reflection.txt"
"log_full_wrapper.txt"
"log_qjs_full_wrapper.txt"
"log_nodejs_full_wrapper.txt"
)
for log_file in "${log_files[@]}"; do
echo "Processing $log_file"
grep "ENV_BACKEND" "$log_file" || true
passed_count=$(grep -c "Passed" "$log_file" || true)
echo "Passed: $passed_count"
failed_count=$(grep -c "Failed" "$log_file" || true)
echo "Failed: $failed_count"
grep "Failed" "$log_file" || true
echo
done
unittest-win-dotnet:
runs-on: windows-2022
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x.x'
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- uses: actions/checkout@v3
- name: UnitTest-v8
run: |
cd unity
npm i
cd test/dotnet
node ../../cli dotnet-test v8_9.4
- name: UnitTest-nodejs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -sn
- name: UnitTest-quickjs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -sq
- name: UnitTest-v8-ts
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -ts
unittest-osx-dotnet:
runs-on: macos-latest
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x.x'
- uses: actions/checkout@v3
- name: UnitTest-v8
run: |
cd unity
npm i
cd test/dotnet
node ../../cli dotnet-test
- name: UnitTest-nodejs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -sn
- name: UnitTest-quickjs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -sq
- name: UnitTest-v8-ts
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -ts
unittest-linux-dotnet:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x.x'
- uses: actions/checkout@v3
- name: Install LibC++
run: |
sudo apt-get update
sudo apt-get install clang
sudo apt-get install build-essential
sudo apt-get install libc++-dev
sudo apt-get install libc++abi-dev
- name: UnitTest-v8
run: |
cd unity
npm i
cd test/dotnet
node ../../cli dotnet-test
- name: UnitTest-nodejs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -sn
- name: UnitTest-quickjs
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -sq
- name: UnitTest-v8-ts
run: |
cd unity/test/dotnet
node ../../cli dotnet-test -ts