Skip to content

Commit

Permalink
refactor: move to latest gdunit4 ci github action
Browse files Browse the repository at this point in the history
  • Loading branch information
russmatney committed Mar 21, 2024
1 parent e475ed4 commit cc6330a
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Unit Tests
run-name: ${{ github.head_ref || github.ref_name }}-dothop-ci

on: [ push ]

jobs:
build:
runs-on: ubuntu-22.04
environment: Godot Dev Env
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
concurrency:
group: dothop-ci${{ github.event.number }}
cancel-in-progress: true

- name: Cache Godot files
id: cache-godot
uses: actions/cache@v3
with:
path: |
~/.local/share/godot/**
/usr/local/bin/godot
~/.config/godot/**
key: ${{ runner.os }}-godot-${{ vars.GODOT_VERSION }}

- name: Download and config Godot Engine headless linux server
if: steps.cache-godot.outputs.cache-hit != 'true'
shell: bash
run: |
wget -q https://downloads.tuxfamily.org/godotengine/${{ vars.GODOT_VERSION }}/Godot_v${{ vars.GODOT_VERSION }}-stable_linux.x86_64.zip
mkdir ~/.cache
mkdir -p ~/.config/godot
unzip Godot_v${{ vars.GODOT_VERSION }}-stable_linux.x86_64.zip
mv Godot_v${{ vars.GODOT_VERSION }}-stable_linux.x86_64 /usr/local/bin/godot
jobs:
unit-test:
name: "GDUnit Tests"
runs-on: 'ubuntu-22.04'
timeout-minutes: 10 # The overall timeout
permissions:
actions: write
checks: write
contents: write
pull-requests: write
statuses: write

# https://github.com/MikeSchulze/gdUnit4/blob/master/.github/workflows/ci-pr-example.yml
- name: "Update Project"
continue-on-error: true
shell: bash
run: |
godot -e --path . -s res://addons/gdUnit4/bin/ProjectScanner.gd --headless --audio-driver Dummy
strategy:
fail-fast: false
max-parallel: 10
matrix:
godot-version: ['4.2.1']
godot-status: ['stable']
include:
- godot-version: '4.2.2'
godot-status: 'rc2'
- godot-version: '4.3'
godot-status: 'dev3'

- name: "Run Unit Tests"
timeout-minutes: 10
shell: bash
run: |
chmod +x ./addons/gdUnit4/runtest.sh
xvfb-run --auto-servernum ./addons/gdUnit4/runtest.sh --add "res://test" --audio-driver Dummy --display-driver x11 --rendering-driver opengl3 --screen 0 --continue
steps:
# checkout your repository
- uses: actions/checkout@v4
# run unit tests
- uses: MikeSchulze/gdUnit4-action@v1.0.2
with:
godot-version: ${{ matrix.godot-version }}
godot-status: ${{ matrix.godot-status }}
paths: |
res://test/
timeout: 5
report-name:
report_${{ matrix.version }}_Godot${{ matrix.godot-version }}-${{ matrix.godot-status }}.xml

0 comments on commit cc6330a

Please sign in to comment.