Run all test types on single runner

This commit is contained in:
Leroy Hopson 2024-02-25 13:13:13 +13:00
parent f901d18052
commit 52a259b019
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
2 changed files with 7 additions and 9 deletions

View file

@ -234,13 +234,12 @@ jobs:
path: docs/demo path: docs/demo
test: test:
name: Test (${{ matrix.platform }}, ${{ matrix.arch }}, ${{ matrix.test-type }}, debug) name: Test (${{ matrix.platform }}, ${{ matrix.arch }}, debug)
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [linux, macos, windows] platform: [linux, macos, windows]
test-type: [headless, rendering, unix]
arch: [x86_64, x86_32, universal] arch: [x86_64, x86_32, universal]
exclude: exclude:
- platform: linux - platform: linux
@ -251,10 +250,6 @@ jobs:
arch: x86_32 arch: x86_32
- platform: windows - platform: windows
arch: universal arch: universal
- platform: windows
test-type: rendering
- platform: windows
test-type: unix
include: include:
- platform: linux - platform: linux
os: ubuntu-22.04 os: ubuntu-22.04
@ -269,7 +264,7 @@ jobs:
with: with:
version: "4.2.1-stable" version: "4.2.1-stable"
- name: Macos setup - name: Macos setup
if: ${{ matrix.platform == 'macos' && matrix.test-type == 'rendering' }} if: ${{ matrix.platform == 'macos' }}
run: | run: |
# Some macos runners have metal which means we can use vulkan, others don't. # Some macos runners have metal which means we can use vulkan, others don't.
if system_profiler SPDisplaysDataType | grep -q "Metal"; then if system_profiler SPDisplaysDataType | grep -q "Metal"; then
@ -303,10 +298,10 @@ jobs:
- name: Test - name: Test
shell: bash shell: bash
run: | run: |
if [ "${{ matrix.test-type }}" = "headless" ]; then if [ "${{ matrix.platform }}" = "windows" ]; then
just test just test
else else
just test-${{ matrix.test-type }} just test-all
fi fi
merge-artifacts: merge-artifacts:

View file

@ -14,6 +14,9 @@ install:
test: test:
{{godot}} --headless -s addons/gut/gut_cmdln.gd -gtest=res://test/test_terminal.gd,res://test/test_pty.gd -gexit {{godot}} --headless -s addons/gut/gut_cmdln.gd -gtest=res://test/test_terminal.gd,res://test/test_pty.gd -gexit
test-all:
{{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gdir=res://test -gopacity=0 -gexit
test-rendering: test-rendering:
{{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gtest=res://test/test_rendering.gd -gopacity=0 -gexit {{godot}} --windowed --resolution 400x200 --position 0,0 -s addons/gut/gut_cmdln.gd -gtest=res://test/test_rendering.gd -gopacity=0 -gexit