Skip to content

Commit fba65fe

Browse files
committed
Consolidate coverage workflow into main test workflow and add framework parameter support- Remove separate test-coverage.yml workflow- Add conditional coverage steps to tests.yml workflow using coverage-check output- Add framework parameter support to Taskfile.yml- Coverage now runs only on Ubuntu x64 with .NET 8.0.x to optimize CI resources- Add .NET 9.0.x support to test workflows for C# language feature compatibility
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
1 parent 8c8c086 commit fba65fe

3 files changed

Lines changed: 186 additions & 291 deletions

File tree

.github/workflows/test-coverage.yml

Lines changed: 0 additions & 141 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ jobs:
8383
env:
8484
DOTNET_INSTALL_DIR: ~/.dotnet
8585

86+
- name: Install Task for using Taskfile
87+
run: |
88+
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
89+
8690
- name: Install shared software dependencies
8791
uses: ./.github/workflows/install-shared-dependencies
8892
with:
@@ -109,6 +113,33 @@ jobs:
109113
redis-server --save "" --daemonize "yes"
110114
./install_and_test.sh -no-tls -minimal -only-glide -data 1 -tasks 10 -csharp -dotnet-framework net${{ matrix.dotnet }}
111115
116+
- name: Check if coverage needed
117+
id: coverage-check
118+
run: |
119+
if [[ "${{ matrix.dotnet }}" == "8.0.x" && "${{ contains(matrix.host.RUNNER, 'ubuntu') }}" == "true" && "${{ matrix.host.ARCH }}" == "x64" ]]; then
120+
echo "coverage-enabled=true" >> $GITHUB_OUTPUT
121+
fi
122+
123+
- name: Build and run coverage
124+
if: ${{ steps.coverage-check.outputs.coverage-enabled == 'true' }}
125+
run: task coverage
126+
127+
- name: Upload coverage report artifact
128+
if: ${{ steps.coverage-check.outputs.coverage-enabled == 'true' }}
129+
uses: actions/upload-artifact@v4
130+
with:
131+
name: coverage-report
132+
path: reports/
133+
retention-days: 30
134+
135+
- name: Upload coverage results artifact
136+
if: ${{ steps.coverage-check.outputs.coverage-enabled == 'true' }}
137+
uses: actions/upload-artifact@v4
138+
with:
139+
name: test-results
140+
path: testresults/
141+
retention-days: 30
142+
112143
- name: Upload test reports
113144
if: always()
114145
continue-on-error: true

0 commit comments

Comments
 (0)