From 0c86917a5d77d703377fddd3eb9075c22b609fbb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 01:17:32 +0000 Subject: [PATCH 1/5] Initial plan From 6e7b4f32a23c943af97f5a6e46fe9480255b0780 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 01:28:21 +0000 Subject: [PATCH 2/5] Fix CI: replace coverlet.msbuild with coverlet.collector, use XPlat Code Coverage Agent-Logs-Url: https://github.com/bitfaster/BitFaster.Caching/sessions/1213f3af-dcbe-4a7d-a266-ca2ae9f80533 Co-authored-by: bitfaster <12851828+bitfaster@users.noreply.github.com> --- .github/workflows/gate.yml | 10 +++++----- .../BitFaster.Caching.UnitTests.csproj | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index f57fce02..7fad0114 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -107,14 +107,14 @@ jobs: run: dotnet restore - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore -p:UseSharedCompilation=false - name: Test run: | dotnet test --no-restore --verbosity normal -f ${{ matrix.framework }} \ - ${{ matrix.coverage && '-p:CollectCoverage=true' || '' }} \ - ${{ matrix.coverage && '-p:CoverletOutput=TestResults/' || '' }} \ - ${{ matrix.coverage && '-p:CoverletOutputFormat=lcov' || '' }} \ + -p:UseSharedCompilation=false \ + ${{ matrix.coverage && '--collect:"XPlat Code Coverage"' || '' }} \ + ${{ matrix.coverage && '-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov' || '' }} \ --logger "trx;LogFileName=${{ matrix.results }}" shell: bash @@ -137,7 +137,7 @@ jobs: uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.${{ matrix.framework }}.info + path-to-lcov: BitFaster.Caching.UnitTests/TestResults/**/coverage.info flag-name: ${{ matrix.flag }} parallel: true diff --git a/BitFaster.Caching.UnitTests/BitFaster.Caching.UnitTests.csproj b/BitFaster.Caching.UnitTests/BitFaster.Caching.UnitTests.csproj index 89674ce5..595d9316 100644 --- a/BitFaster.Caching.UnitTests/BitFaster.Caching.UnitTests.csproj +++ b/BitFaster.Caching.UnitTests/BitFaster.Caching.UnitTests.csproj @@ -6,9 +6,8 @@ - + all - runtime; build; native; contentfiles; analyzers; buildtransitive From 12a2c5c38e880c2579bacc39b49f98c92cc26351 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 06:51:30 +0000 Subject: [PATCH 3/5] Fix Windows coveralls path: use find step to resolve coverage.info before coveralls step Agent-Logs-Url: https://github.com/bitfaster/BitFaster.Caching/sessions/ff8e1edb-9a03-4b7d-a194-6b500f4aa1dd Co-authored-by: bitfaster <12851828+bitfaster@users.noreply.github.com> --- .github/workflows/gate.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 7fad0114..05083e09 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -132,12 +132,18 @@ jobs: name: ${{ matrix.artifact }}-std path: BitFaster.Caching.UnitTests.Std/TestResults/${{ matrix.results }} + - name: Find lcov file + id: find-lcov + if: ${{ matrix.coverage && matrix.flag != '' }} + shell: bash + run: echo "path=$(find BitFaster.Caching.UnitTests/TestResults -name 'coverage.info' | head -1)" >> $GITHUB_OUTPUT + - name: Publish coverage report to coveralls.io if: ${{ matrix.coverage && matrix.flag != '' }} uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: BitFaster.Caching.UnitTests/TestResults/**/coverage.info + path-to-lcov: ${{ steps.find-lcov.outputs.path }} flag-name: ${{ matrix.flag }} parallel: true From 6038591070a969a1be39821cfdaa82cdd8f36597 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 06:52:06 +0000 Subject: [PATCH 4/5] Add error handling if coverage.info is not found Agent-Logs-Url: https://github.com/bitfaster/BitFaster.Caching/sessions/ff8e1edb-9a03-4b7d-a194-6b500f4aa1dd Co-authored-by: bitfaster <12851828+bitfaster@users.noreply.github.com> --- .github/workflows/gate.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 05083e09..8ad0bf72 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -136,7 +136,10 @@ jobs: id: find-lcov if: ${{ matrix.coverage && matrix.flag != '' }} shell: bash - run: echo "path=$(find BitFaster.Caching.UnitTests/TestResults -name 'coverage.info' | head -1)" >> $GITHUB_OUTPUT + run: | + path=$(find BitFaster.Caching.UnitTests/TestResults -name 'coverage.info' | head -1) + [ -n "$path" ] || (echo 'Coverage file not found' && exit 1) + echo "path=$path" >> $GITHUB_OUTPUT - name: Publish coverage report to coveralls.io if: ${{ matrix.coverage && matrix.flag != '' }} From fc60109202bdd4797c0ef9ff7061900a99f6f54c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 5 May 2026 22:52:11 +0000 Subject: [PATCH 5/5] Fix TRX artifact upload: move --logger before -- separator in Test step Agent-Logs-Url: https://github.com/bitfaster/BitFaster.Caching/sessions/62660ea9-fec0-4492-ac0c-c4d809e5d8c9 Co-authored-by: bitfaster <12851828+bitfaster@users.noreply.github.com> --- .github/workflows/gate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 8ad0bf72..6ce8d072 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -114,8 +114,8 @@ jobs: dotnet test --no-restore --verbosity normal -f ${{ matrix.framework }} \ -p:UseSharedCompilation=false \ ${{ matrix.coverage && '--collect:"XPlat Code Coverage"' || '' }} \ - ${{ matrix.coverage && '-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov' || '' }} \ - --logger "trx;LogFileName=${{ matrix.results }}" + --logger "trx;LogFileName=${{ matrix.results }}" \ + ${{ matrix.coverage && '-- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov' || '' }} shell: bash - name: Upload test results