Skip to content

Commit

Permalink
fix test failing in ci but passing locally
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl committed Jan 2, 2025
1 parent 73ab190 commit 3b3d580
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions INTERNAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
The `ci.yml` workflow includes support for [act](https://github.com/nektos/act).

To run all tests using act, run `composer act`. To run only certain tests using act, use `composer act-input "FILTER='some test name'"` or `composer act -- --input "FILTER='some test name'"`.

Helpful note: GHA doesn't mount the project at /var/www/html like the docker compose setup does. This can be observed in act where the inner container's filesystem structure will match the host.

Also, for debugging act you can just add a job that does `sleep 1h` and then `docker ps` + `docker exec -it <id> bash`.
6 changes: 4 additions & 2 deletions tests/Features/NoAttachTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
}

if (php_uname('m') == 'aarch64') {
DisallowSqliteAttach::$extensionPath = '/var/www/html/extensions/lib/arm/noattach.so';
// Escape testbench prison. Can't hardcode /var/www/html/extensions/... here
// since GHA doesn't mount the filesystem on the container's workdir
DisallowSqliteAttach::$extensionPath = realpath(base_path('../../../../extensions/lib/arm/noattach.so'));
} else {
DisallowSqliteAttach::$extensionPath = '/var/www/html/extensions/lib/noattach.so';
DisallowSqliteAttach::$extensionPath = realpath(base_path('../../../../extensions/lib/noattach.so'));
}

if ($disallow) config(['tenancy.features' => [DisallowSqliteAttach::class]]);
Expand Down

0 comments on commit 3b3d580

Please sign in to comment.