Skip to content

Run the Filament tests in CI - #2541

Merged
lancepioch merged 1 commit into
mainfrom
fix/run-filament-tests-in-ci
Aug 24, 2026
Merged

Run the Filament tests in CI#2541
lancepioch merged 1 commit into
mainfrom
fix/run-filament-tests-in-ci

Conversation

@lancepioch

Copy link
Copy Markdown
Member

tests/Filament wasn't in any phpunit testsuite and no CI job ran it, so those tests have never actually executed. They'd rotted in the meantime: ListNodesTest and ListEggsTest referenced an undefined Permission class, called a factory Spatie's model doesn't have, resolved action urls against the default app panel instead of admin, and asserted a toolbar action as if it were a record action.

Fixed the seven failures, added a Filament testsuite and ran it from the sqlite job. Nothing in them is database specific so there's no reason to repeat them across the mysql, mariadb and postgres matrices.

tests/Filament was not in any phpunit testsuite and no CI job ran it, so the
panel and authorization tests have never executed anywhere. Unsurprisingly
they had rotted: ListNodesTest and ListEggsTest were referencing an undefined
Permission class, calling a factory Spatie's Permission model does not have,
resolving action urls against the default app panel rather than admin, and
asserting a toolbar action as if it were a record action.

Fix the seven failures, add a Filament testsuite and run it from the sqlite
job. These are panel tests with nothing database specific in them, so there is
no reason to repeat them across the mysql, mariadb and postgres matrices.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0977d49a-6572-4686-b0bd-17849a1fe7f0

📥 Commits

Reviewing files that changed from the base of the PR and between 8a2f731 and 7843996.

📒 Files selected for processing (4)
  • .github/workflows/ci.yaml
  • phpunit.xml
  • tests/Filament/Admin/ListEggsTest.php
  • tests/Filament/Admin/ListNodesTest.php

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The PR registers the Filament PHPUnit suite, adds it to SQLite CI execution, and standardizes Filament admin panel and permission setup in node and egg tests. The node test also verifies the table create action by name.

Changes

Filament test coverage

Layer / File(s) Summary
Register and execute Filament tests
.github/workflows/ci.yaml, phpunit.xml
PHPUnit now includes tests/Filament. The SQLite CI job runs the suite with snapshot creation disabled.
Stabilize admin test context
tests/Filament/Admin/ListEggsTest.php, tests/Filament/Admin/ListNodesTest.php
The tests select and clear the admin panel around each test. Permission setup uses Permission::findOrCreate() and givePermissionTo(). The empty-node test checks for the table create action.

Merge Risk: ⚪ Minimal · up to 78439

The PR adds the Filament tests to CI and corrects their test setup and assertions; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: running the Filament tests in CI.
Description check ✅ Passed The description directly explains the test suite, CI integration, and fixes included in the changeset.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lancepioch lancepioch self-assigned this Aug 24, 2026
@lancepioch
lancepioch merged commit 87946e3 into main Aug 24, 2026
17 checks passed
@lancepioch
lancepioch deleted the fix/run-filament-tests-in-ci branch August 24, 2026 17:50
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants