@@ -4,6 +4,8 @@ on: [push, pull_request]
44env :
55 # Only used for the cache key. Increment version to force clean build.
66 GODOT_BASE_BRANCH : master
7+ # Used to select the version of Godot to run the tests with.
8+ GODOT_TEST_VERSION : master
79
810concurrency :
911 group : ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
@@ -153,7 +155,7 @@ jobs:
153155
154156 - name : Download latest Godot artifacts
155157 uses : dsnopek/action-download-artifact@1322f74e2dac9feed2ee76a32d9ae1ca3b4cf4e9
156- if : ${{ matrix.run-tests }}
158+ if : ${{ matrix.run-tests && env.GODOT_TEST_VERSION == 'master' }}
157159 with :
158160 repo : godotengine/godot
159161 branch : master
@@ -166,15 +168,28 @@ jobs:
166168 ensure_latest : true
167169 path : godot-artifacts
168170
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+
169185 - name : Run tests
170186 if : ${{ matrix.run-tests }}
171187 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
174189 cd test
175190 # Need to run the editor so .godot is generated... but it crashes! Ignore that :-)
176- (cd project && (timeout 30 ../../godot-artifacts/godot.linuxbsd.editor.x86_64.mono --import --headless >/dev/null 2>&1 || true))
177- GODOT=../godot-artifacts/godot.linuxbsd.editor.x86_64.mono ./run-tests.sh
191+ (cd project && (timeout 30 $GODOT --import --headless >/dev/null 2>&1 || true))
192+ ./run-tests.sh
178193
179194 - name : Upload artifact
180195 uses : actions/upload-artifact@v3
0 commit comments