diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index a88a41a4..2bc45c00 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -24,6 +24,9 @@ jobs: tests: name: Tests runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write steps: - name: Checkout uses: actions/checkout@v4 @@ -37,4 +40,11 @@ jobs: godot --path . --headless --import - name: Run tests run: | - godot --path . --headless --script addons/gut/gut_cmdln.gd -gexit + godot --path . --headless --script addons/gut/gut_cmdln.gd -gjunit_xml_file=test-report.xml -gexit + - name: Publish test results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: test-report.xml + comment_mode: failures + test_file_prefix: "-res://" diff --git a/tests/test_instruction_tree.gd b/tests/test_instruction_tree.gd index d42ddcbc..725a0ed5 100644 --- a/tests/test_instruction_tree.gd +++ b/tests/test_instruction_tree.gd @@ -65,3 +65,7 @@ func test_tree_node_text(): var text: String = tree.generate_text(root, 0) assert_eq(text, "root\n\tchild1\n\t\tgrandchild\n\tchild2\nsibling\n\tnephew\n") + + +func test_error(): + assert_eq("a", "b")