GitHub Action · Godot 4.7
A Godot check on every pull request.
The Godotwright receipt reviews the GDScript and scenes in a pull request, loads them with a checksum-verified Godot, runs your GUT or GdUnit4 tests and scenarios, and posts one table as a comment, updated on the next push. No editor, no GPU, and the job fails when a step fails.
Set it up
Save this as .github/workflows/godotwright.yml in your game’s repository. That is all.
on: pull_request
permissions: { contents: read, pull-requests: write }
jobs:
receipt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: laaielichter/godotwright@v0.5.0
with: { comment: "true" }For a review only, which needs no Godot download, add review-only: "true". Without comment, the receipt goes to the job summary only, and the job needs just contents: read.
What the comment looks like
Godotwright: checks failed
| Step | Result |
|---|---|
| review | ❌ score 50/100, 18 errors, 9 warnings |
| check | ➖ skipped (--no-godot-checks) |
| test | ➖ skipped (--no-godot-checks) |
| scenarios | ➖ skipped (--no-godot-checks) |
res://scripts/enemy.gd:15: error [api/unknown-function] Function "look_at_smooth()" does not exist in "Enemy", its parents or the global scope. Did you mean: look_at? res://scripts/enemy.gd:22: error [api/unknown-input-action] Input action "fire" is not in the Input Map. res://scripts/old_player.gd:1: error [api/unknown-type] Cannot extend "KinematicBody2D" … In Godot 4 it is `CharacterBody2D` (Godot 3 name). res://scripts/old_player.gd:11: error [api/godot3-syntax] Godot 3 syntax: `yield()` is `await` in Godot 4. …
Real output of godotwright ci --no-godot-checks 0.4.0 on a small test project with Godot 3 code and made-up methods. With Godot, the check, test and scenario rows run too.
The four steps
- review: a score from 0 to 100 for api, performance, quality and structure, without Godot. It catches Godot 3 code, methods and signals that do not exist in Godot 4.7, missing
$Nodepaths, scene connections to missing methods, unknown input actions and per-frame lookups, each asfile:linewith the fix. - check: Godot imports the project and loads every script and scene headless; each error comes back once, runtime errors with their GDScript call chain.
- test: your GUT or GdUnit4 tests, headless; only what failed is shown.
- scenarios: JSON files in
.godotwright/scenarios/that run a scene, play input into it and check what the game did, for example"Hero.position.x >= 100 @ 25".
Inputs
| Input | Default | What it does |
|---|---|---|
path | . | The project folder, or any path inside it |
godot-version | 4.7.2 | The Godot version to download for the checks that need it |
review-only | false | Only the review: no Godot download, no check, tests or scenarios |
comment | false | Post the receipt as a comment on the pull request (needs pull-requests: write) |
token | github.token | The token that posts the comment |
command | npx -y godotwright@latest | How to run Godotwright; pin a version here, for example npx -y godotwright@0.4.0 |
The output ok is true when every step passed.
Findings inline, or a plain review
To see each finding on its line in the pull request, upload the review as SARIF to GitHub code scanning (needs security-events: write and code scanning turned on):
- run: npx --yes godotwright@0.5.0 review . --sarif > godotwright.sarif || true
- uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: godotwright.sarifOr fail a build on errors or a low score, in any CI that has Node.js 22.12 or newer:
npx --yes godotwright@0.5.0 review . --min-score 80FAQ
Does it need a GPU or the Godot editor?
No. It downloads a checksum-verified Godot 4.7 for Linux and runs it headless on a standard GitHub runner. With review-only it needs no Godot at all.
Does it send my code anywhere?
No. Everything runs on your own runner. The only thing it posts is the receipt, as a comment on your pull request, when comment is true.
My Godot project is in a subfolder.
Set path to the folder that holds project.godot, or to any path inside it.
Will it fail on my existing code?
It fails when a step has errors. Start with review-only, fix the errors (godotwright fix does the mechanical ones), then turn on the Godot steps. A finding you think is wrong is worth an issue.
Does it work with C#?
No. The review reads GDScript and scenes, and the action downloads the standard Godot build, without .NET.