Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: Publish test results #45

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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://"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work; so the annotations don't get lined up with the source files.

4 changes: 4 additions & 0 deletions tests/test_instruction_tree.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Loading