@@ -4,6 +4,8 @@ on: [push, pull_request]
4
4
env :
5
5
# Only used for the cache key. Increment version to force clean build.
6
6
GODOT_BASE_BRANCH : master
7
+ # Used to select the version of Godot to run the tests with.
8
+ GODOT_TEST_VERSION : 4.2.2-stable
7
9
8
10
concurrency :
9
11
group : ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
@@ -153,7 +155,7 @@ jobs:
153
155
154
156
- name : Download latest Godot artifacts
155
157
uses : dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
156
- if : ${{ matrix.run-tests }}
158
+ if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
157
159
with :
158
160
repo : godotengine/godot
159
161
branch : master
@@ -166,15 +168,28 @@ jobs:
166
168
ensure_latest : true
167
169
path : godot-artifacts
168
170
171
+ - name : Prepare Godot artifacts for testing
172
+ if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
173
+ run : |
174
+ chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
175
+ echo "GODOT=$(pwd)/godot-artifacts/godot.linuxbsd.editor.x86_64.mono" >> $GITHUB_ENV
176
+
177
+ - name : Download requested Godot version for testing
178
+ if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION != 'master' }}
179
+ run : |
180
+ wget "https://github.com/godotengine/godot-builds/releases/download/${GODOT_TEST_VERSION}/Godot_v${GODOT_TEST_VERSION}_linux.x86_64.zip" -O Godot.zip
181
+ unzip -a Godot.zip
182
+ chmod +x "Godot_v${GODOT_TEST_VERSION}_linux.x86_64"
183
+ echo "GODOT=$(pwd)/Godot_v${GODOT_TEST_VERSION}_linux.x86_64" >> $GITHUB_ENV
184
+
169
185
- name : Run tests
170
186
if : ${{ matrix.run-tests }}
171
187
run : |
172
- chmod +x ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono
173
- ./godot-artifacts/godot.linuxbsd.editor.x86_64.mono --headless --version
188
+ $GODOT --headless --version
174
189
cd test
175
190
# Need to run the editor so .godot is generated... but it crashes! Ignore that :-)
176
- (cd project && (timeout 10 ../../godot-artifacts/godot.linuxbsd.editor.x86_64.mono --editor --headless --quit >/dev/null 2>&1 || true))
177
- GODOT=../godot-artifacts/godot.linuxbsd.editor.x86_64.mono ./run-tests.sh
191
+ (cd project && (timeout 30 $GODOT --editor --headless --quit >/dev/null 2>&1 || true))
192
+ ./run-tests.sh
178
193
179
194
- name : Upload artifact
180
195
uses : actions/upload-artifact@v3
0 commit comments