Skip to content

Commit

Permalink
Split workflows into two (#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
CakeVR authored Jan 4, 2024
1 parent 271ad0f commit 4e81b82
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ on:
- '**.md'

pull_request:
paths-ignore:
- '**.yml'
- '**.md'

workflow_dispatch:


concurrency:
group: unit-test${{ github.event.number }}
cancel-in-progress: true


jobs:
unit-test:
strategy:
Expand Down Expand Up @@ -96,25 +91,15 @@ jobs:
chmod +x ./addons/gdUnit4/runtest.sh
xvfb-run --auto-servernum ./addons/gdUnit4/runtest.sh --add "res://addons/dialogic/Tests/" --audio-driver Dummy --display-driver x11 --rendering-driver opengl3 --screen 0 --continue
- name: "Publish Test Report"
if: ${{ always() }}
uses: dorny/[email protected]
with:
name: "test_report_${{ matrix.godot-version }}"
path: "reports/**/results.xml"
reporter: java-junit
fail-on-error: 'false'

- name: "Upload Unit Test Reports"
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: "test_report_${{ matrix.godot-version }}"
name: "godot-version"
path: |
reports/**
/var/lib/systemd/coredump/**
/var/log/syslog
fail-on-error: 'false'
finalize:
if: ${{ !cancelled() }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/unit_test_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'publish-test'
on:
workflow_run:
workflows: ['unit-test']
types:
- completed

permissions:
contents: read
actions: read
checks: write

jobs:
report:
runs-on: ubuntu-latest
steps:

- name: "Publish Test Report"
if: ${{ always() }}
uses: dorny/[email protected]
with:
name: "test_report"
path: "reports/**/results.xml"
reporter: java-junit
2 changes: 1 addition & 1 deletion addons/dialogic/Tests/Unit/test_example.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class_name GdUnitExampleTest
extends GdUnitTestSuite

func test_example() -> void:
const EXAMPLE_STRING := "Dialogic!"
const EXAMPLE_STRING := "Dialogic Test!"

assert_str(EXAMPLE_STRING)\
.has_length(EXAMPLE_STRING.length())\
Expand Down

0 comments on commit 4e81b82

Please sign in to comment.