From 03dad0dd5df291fda5f291e5acb91f4ac6de3bc1 Mon Sep 17 00:00:00 2001 From: Shiipou Date: Wed, 3 Dec 2025 09:53:44 +0100 Subject: [PATCH 1/4] feat: add coverage options to bun tests --- .github/workflows/test-bun.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-bun.yml b/.github/workflows/test-bun.yml index b98c335..3b47592 100644 --- a/.github/workflows/test-bun.yml +++ b/.github/workflows/test-bun.yml @@ -14,6 +14,15 @@ on: description: 'Version of Java to use' required: false default: 'latest' + artifact-name: + type: string + description: 'Give artifact name for coverage report' + required: false + artifact-path: + type: string + description: 'Coverage report path to upload as artifact' + required: false + default: 'coverage/lcov.info' outputs: artifact-id: description: 'The ID of the uploaded artifact' @@ -50,4 +59,12 @@ jobs: run: bun install - name: Build with Bun - run: bun test + run: bun test --coverage --coverage-reporter=lcov --coverage-dir=./coverage + + - id: upload-artifact + name: Upload artifact + if: inputs.artifact-name != '' + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact-name }} + path: ${{ inputs.working-directory }}/${{ inputs.artifact-path }} From 2878f2ccbe364acdf37d4ac5b0d4d878c16eb86b Mon Sep 17 00:00:00 2001 From: Thomas DA ROCHA Date: Wed, 3 Dec 2025 09:57:36 +0100 Subject: [PATCH 2/4] fix: Update .github/workflows/test-bun.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/test-bun.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-bun.yml b/.github/workflows/test-bun.yml index 3b47592..670a417 100644 --- a/.github/workflows/test-bun.yml +++ b/.github/workflows/test-bun.yml @@ -11,7 +11,7 @@ on: default: '.' bun-version: type: string - description: 'Version of Java to use' + description: 'Version of Bun to use' required: false default: 'latest' artifact-name: From 697114952e190684d0996277707d31266e469e83 Mon Sep 17 00:00:00 2001 From: Thomas DA ROCHA Date: Wed, 3 Dec 2025 09:58:39 +0100 Subject: [PATCH 3/4] fix: Update .github/workflows/test-bun.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/test-bun.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-bun.yml b/.github/workflows/test-bun.yml index 670a417..1a9f7b9 100644 --- a/.github/workflows/test-bun.yml +++ b/.github/workflows/test-bun.yml @@ -58,7 +58,7 @@ jobs: - name: Install Bun dependencies run: bun install - - name: Build with Bun + - name: Run tests with coverage run: bun test --coverage --coverage-reporter=lcov --coverage-dir=./coverage - id: upload-artifact From 0835a35adad2f4ac47d26a8aff4485e417619e82 Mon Sep 17 00:00:00 2001 From: Thomas DA ROCHA Date: Wed, 3 Dec 2025 09:59:56 +0100 Subject: [PATCH 4/4] fix: Update .github/workflows/test-bun.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/test-bun.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-bun.yml b/.github/workflows/test-bun.yml index 1a9f7b9..76b05b1 100644 --- a/.github/workflows/test-bun.yml +++ b/.github/workflows/test-bun.yml @@ -63,7 +63,7 @@ jobs: - id: upload-artifact name: Upload artifact - if: inputs.artifact-name != '' + if: inputs.artifact-name != '' && inputs.artifact-path != '' uses: actions/upload-artifact@v4 with: name: ${{ inputs.artifact-name }}