From 78192498d4023928846f0acff4ce279fbbdce4a5 Mon Sep 17 00:00:00 2001 From: Russell Matney Date: Fri, 30 Aug 2024 23:50:32 -0400 Subject: [PATCH] fix: use newer gdunit ci setup --- .github/workflows/unit-tests.yml | 68 ++++++++++++++------------------ 1 file changed, 29 insertions(+), 39 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 4c7f2d22..1834c5af 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -8,45 +8,35 @@ concurrency: cancel-in-progress: true jobs: - build: - runs-on: ubuntu-22.04 - environment: Godot Dev Env - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - lfs: 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 + 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.3'] + godot-status: ['stable'] - - 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.1.1 + with: + godot-version: ${{ matrix.godot-version }} + godot-status: ${{ matrix.godot-status }} + # version: 'installed' + paths: | + res://test/ + timeout: 5 + upload-report: false