From 6ed6591cb06285a56ffe94e26ba795e329a17ce4 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:25:27 +0200 Subject: [PATCH 01/12] See what colors look like in GitHub Actions --- .github/workflows/check.yml | 20 ++---------- .github/workflows/test.yml | 63 ------------------------------------- 2 files changed, 2 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index bd05e9c2..fbe7e909 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -44,21 +44,5 @@ jobs: env: NO_ELM_TOOLING_INSTALL: 1 - - name: elm-tooling install - run: npx --no-install elm-tooling install - - - name: Flow - run: npx --no-install flow check - - - name: ESLint - run: npx --no-install eslint --report-unused-disable-directives . - - - name: Prettier - run: npx --no-install prettier --check . - - - name: elm-format - run: npx --no-install elm-format --validate elm - - - name: elm-review - run: npx --no-install elm-review - working-directory: elm + - run: ../bin/elm-test --color + working-directory: example-application diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 73105699..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Test - -on: - push: - branches: - - 'master' - pull_request: - -jobs: - main: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - # Node.js 12, 14 and 16 aren’t supported on the macOS arm64 runners. - os: [ubuntu-latest, macOS-15-intel, windows-latest] - node-version: [12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 24.x] - # Also have a test on macOS arm64. - include: - - os: macOS-latest - node-version: 24.x - - env: - ELM_HOME: '${{ github.workspace }}/elm-stuff/elm-home' - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: '${{ matrix.node-version }}' - - - name: Cache node_modules - id: cache-node_modules - uses: actions/cache@v4 - with: - path: node_modules - key: node_modules-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }} - - - name: Cache ELM_HOME - uses: actions/cache@v4 - with: - path: '${{ env.ELM_HOME }}' - key: elm-${{ matrix.os }}-${{ hashFiles('elm-tooling.json', 'elm/**/elm.json', 'example-*/**/elm.json', 'tests/**/elm.json') }} - - - name: npm ci - if: steps.cache-node_modules.outputs.cache-hit != 'true' - run: npm ci - env: - NO_ELM_TOOLING_INSTALL: 1 - - - name: install mocha 9 - if: steps.cache-node_modules.outputs.cache-hit != 'true' && (matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x') - run: npm install mocha@9 - - - name: elm-tooling install - run: npx --no-install elm-tooling install - - - name: Mocha - run: npx --no-install mocha tests - - - name: elm-test - run: npm run elm-test From 9f25b587bed591bdeaf9edcbcfb64472251a405a Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:27:56 +0200 Subject: [PATCH 02/12] Maybe fin Elm binary discovery --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index fbe7e909..2c980249 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -44,5 +44,5 @@ jobs: env: NO_ELM_TOOLING_INSTALL: 1 - - run: ../bin/elm-test --color + - run: npx node ../bin/elm-test --color working-directory: example-application From c1a129ef9ebae27cca8f4c596aa2a4caa5326d27 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:30:03 +0200 Subject: [PATCH 03/12] elm-tooling install --- .github/workflows/check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2c980249..e40ff2de 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -44,5 +44,7 @@ jobs: env: NO_ELM_TOOLING_INSTALL: 1 + - run: npx elm-tooling install + - run: npx node ../bin/elm-test --color working-directory: example-application From 72fece6571bb2029cd6777245a1b3f044661c50b Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:33:27 +0200 Subject: [PATCH 04/12] log color usage --- lib/Generate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Generate.js b/lib/Generate.js index e6aec134..8b927be4 100644 --- a/lib/Generate.js +++ b/lib/Generate.js @@ -274,6 +274,7 @@ function generateElmReportVariant( return 'JUnitReport'; case 'console': if (supportsColor) { + console.log('ConsoleReport UseColor'); return 'ConsoleReport UseColor'; } else { return 'ConsoleReport Monochrome'; From 0614d40000b52f330673b6bf37e065c2b9485c67 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:35:18 +0200 Subject: [PATCH 05/12] try skipping underline --- elm/src/Test/Reporter/Console.elm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elm/src/Test/Reporter/Console.elm b/elm/src/Test/Reporter/Console.elm index 00ca095a..44d8c360 100644 --- a/elm/src/Test/Reporter/Console.elm +++ b/elm/src/Test/Reporter/Console.elm @@ -210,10 +210,10 @@ reportSummary useColor { todos, passed, failed, duration } autoFail = headline = case headlineResult of Ok str -> - underline (green ("\n" ++ str ++ "\n\n")) + (green ("\n" ++ str ++ "\n\n")) Err ( colorize, str, suffix ) -> - [ underline (colorize ("\n" ++ str)) + [ (colorize ("\n" ++ str)) , colorize (suffix ++ "\n\n") ] |> Text.concat From 36bbbdbe3391b8a8a7cc5db2c2278e9e1c9ec696 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:38:26 +0200 Subject: [PATCH 06/12] log all messages --- templates/after.js | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/after.js b/templates/after.js index 5d4851a9..45385b77 100644 --- a/templates/after.js +++ b/templates/after.js @@ -19,6 +19,7 @@ client.on('data', function (msg) { // Use ports for inter-process communication. app.ports.elmTestPort__send.subscribe(function (msg) { + console.log('MSG', msg); // We split incoming messages on the socket on newlines. The gist is that node // is rather unpredictable in whether or not a single `write` will result in a // single `on('data')` callback. Sometimes it does, sometimes multiple writes From 97d1d1037ed6a5a6e7e03b8b2060c4bf8da65674 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:43:32 +0200 Subject: [PATCH 07/12] even more logging --- lib/Supervisor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Supervisor.js b/lib/Supervisor.js index 22ddbf2f..901d259e 100644 --- a/lib/Supervisor.js +++ b/lib/Supervisor.js @@ -54,6 +54,7 @@ function run( } break; case 'summary': + console.log(JSON.stringify(makeWindowsSafe(result.summary))); console.log(makeWindowsSafe(result.summary)); break; default: @@ -161,6 +162,7 @@ function run( } var response = JSON.parse(data); + console.log('READ', response); switch (response.type) { case 'FINISHED': From 5014ae2e122272b4078f88aa4d1b285faeb6ea1a Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:46:04 +0200 Subject: [PATCH 08/12] try just a simple print --- .github/workflows/check.yml | 2 ++ print.js | 1 + 2 files changed, 3 insertions(+) create mode 100644 print.js diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e40ff2de..a2f6c90f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -46,5 +46,7 @@ jobs: - run: npx elm-tooling install + - run: node print.js + - run: npx node ../bin/elm-test --color working-directory: example-application diff --git a/print.js b/print.js new file mode 100644 index 00000000..98545648 --- /dev/null +++ b/print.js @@ -0,0 +1 @@ +console.log("\u001b[31m\nTEST RUN FAILED\u001b[39m\u001b[31m\n\n\u001b[39m\u001b[2mDuration: \u001b[22m154 ms\n\u001b[2mPassed: \u001b[22m3\n\u001b[2mFailed: \u001b[22m9\n\u001b[2mTodo: \u001b[22m3\n") From eca6a6ed203d3fc03d605f17fbd0d91b80c8d3da Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:48:51 +0200 Subject: [PATCH 09/12] red print from ChatGPT --- print.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/print.js b/print.js index 98545648..0e4c3cd9 100644 --- a/print.js +++ b/print.js @@ -1 +1,4 @@ -console.log("\u001b[31m\nTEST RUN FAILED\u001b[39m\u001b[31m\n\n\u001b[39m\u001b[2mDuration: \u001b[22m154 ms\n\u001b[2mPassed: \u001b[22m3\n\u001b[2mFailed: \u001b[22m9\n\u001b[2mTodo: \u001b[22m3\n") +console.log('\x1b[31mThis text is red\x1b[0m'); +console.log( + '\u001b[31m\nTEST RUN FAILED\u001b[39m\u001b[31m\n\n\u001b[39m\u001b[2mDuration: \u001b[22m154 ms\n\u001b[2mPassed: \u001b[22m3\n\u001b[2mFailed: \u001b[22m9\n\u001b[2mTodo: \u001b[22m3\n' +); From a2a0303f0217e49606ddabe1883680d474b1d87d Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:51:41 +0200 Subject: [PATCH 10/12] escape code experiments --- print.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/print.js b/print.js index 0e4c3cd9..2fd4691a 100644 --- a/print.js +++ b/print.js @@ -1,4 +1,6 @@ console.log('\x1b[31mThis text is red\x1b[0m'); +console.log('\u001b[31mThis text is red\u001b[0m'); +console.log('\u001b[31m\nThis text is red\u001b[0m'); console.log( - '\u001b[31m\nTEST RUN FAILED\u001b[39m\u001b[31m\n\n\u001b[39m\u001b[2mDuration: \u001b[22m154 ms\n\u001b[2mPassed: \u001b[22m3\n\u001b[2mFailed: \u001b[22m9\n\u001b[2mTodo: \u001b[22m3\n' + '\u001b[31m\nTEST RUN FAILED\u001b[39m\u001b[31m\n\n\u001b[39m\u001b[2mDuration: \u001b[22m154 ms\n\u001b[2mPassed: \u001b[22m3\n\u001b[2mFailed: \u001b[22m9\n\u001b[2mTodo: \u001b[22m3\n\x1b[0m' ); From e3a61cd30f9e3ae08e8dde19ebdbada6bfa8f4e4 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 22:52:49 +0200 Subject: [PATCH 11/12] remove newline --- print.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print.js b/print.js index 2fd4691a..11c8964d 100644 --- a/print.js +++ b/print.js @@ -2,5 +2,5 @@ console.log('\x1b[31mThis text is red\x1b[0m'); console.log('\u001b[31mThis text is red\u001b[0m'); console.log('\u001b[31m\nThis text is red\u001b[0m'); console.log( - '\u001b[31m\nTEST RUN FAILED\u001b[39m\u001b[31m\n\n\u001b[39m\u001b[2mDuration: \u001b[22m154 ms\n\u001b[2mPassed: \u001b[22m3\n\u001b[2mFailed: \u001b[22m9\n\u001b[2mTodo: \u001b[22m3\n\x1b[0m' + '\u001b[31mTEST RUN FAILED\u001b[39m\u001b[31m\n\n\u001b[39m\u001b[2mDuration: \u001b[22m154 ms\n\u001b[2mPassed: \u001b[22m3\n\u001b[2mFailed: \u001b[22m9\n\u001b[2mTodo: \u001b[22m3\n\x1b[0m' ); From 41a465fa73a46c5ce69553df4bf0cfe66277c2e6 Mon Sep 17 00:00:00 2001 From: Simon Lydell Date: Mon, 30 Mar 2026 23:00:09 +0200 Subject: [PATCH 12/12] try inverted --- print.js | 1 + 1 file changed, 1 insertion(+) diff --git a/print.js b/print.js index 11c8964d..90a44339 100644 --- a/print.js +++ b/print.js @@ -1,3 +1,4 @@ +console.log('\u001B[7mThis text is inverted\u001B[27m'); console.log('\x1b[31mThis text is red\x1b[0m'); console.log('\u001b[31mThis text is red\u001b[0m'); console.log('\u001b[31m\nThis text is red\u001b[0m');