From 149975fa12a35dcd0cf1ed3e5c79d9a1b9e9e633 Mon Sep 17 00:00:00 2001 From: Justin Blake Date: Fri, 10 Apr 2026 10:39:47 +0000 Subject: [PATCH 1/3] DELETEME: show server logs after test output. Need to debug why tests are failing in the github action. This is not the ideal way to do this, but since we are moving to pure nix soon I don't want to put effort into the right way for this devbox/process-compose specific setup. --- .gitignore | 1 + process-compose.yml | 1 + scripts/test.sh | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index b48e3d5..d67cbdb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ db/*.db* dist/app dist/test +logs/ node_modules diff --git a/process-compose.yml b/process-compose.yml index 6577b82..93659ce 100644 --- a/process-compose.yml +++ b/process-compose.yml @@ -7,6 +7,7 @@ processes: ready_log_line: "Web Service listening" server: command: make server + log_location: ./logs/server.log depends_on: db: condition: process_log_ready diff --git a/scripts/test.sh b/scripts/test.sh index 271b498..b6a6fe9 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -12,4 +12,8 @@ test_exit=$? # shutdown backgrounded app devbox services stop +# dump server logs for debugging +echo "=== SERVER LOGS ===" +cat ./logs/server.log + exit $test_exit From dc816c35b910d592b5a95500ec9983097aafa49c Mon Sep 17 00:00:00 2001 From: Justin Blake Date: Fri, 10 Apr 2026 10:54:22 +0000 Subject: [PATCH 2/3] Log the message in Route.Error.serverError --- src/Route/Error.gren | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Route/Error.gren b/src/Route/Error.gren index 1393239..2ff51b5 100644 --- a/src/Route/Error.gren +++ b/src/Route/Error.gren @@ -5,6 +5,7 @@ module Route.Error exposing ) +import Log import Route import Task exposing (Task) @@ -28,6 +29,7 @@ invalidRequestData response message = serverError : Route.Response -> String -> Task Never Route.Response serverError response message = response + |> Route.log (Log.Error message) |> Route.setStatus 500 |> Route.setBody message |> Task.succeed From 72e367f89916e4e878e17bb19e2b9de367362f06 Mon Sep 17 00:00:00 2001 From: Justin Blake Date: Fri, 10 Apr 2026 11:00:49 +0000 Subject: [PATCH 3/3] Make POSTMARK_SERVER_TOKEN visible to test action Silly me for thinking test environment variables were available in actions running in the test environment.... --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54ab43c..ec05bb5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,3 +20,5 @@ jobs: timeout_minutes: 1 max_attempts: 3 command: devbox run test + env: + POSTMARK_SERVER_TOKEN: ${{ vars.POSTMARK_SERVER_TOKEN }}