Skip to content

Bump Microsoft.AspNetCore.Components.WebAssembly from 9.0.7 to 9.0.10 #220

Bump Microsoft.AspNetCore.Components.WebAssembly from 9.0.7 to 9.0.10

Bump Microsoft.AspNetCore.Components.WebAssembly from 9.0.7 to 9.0.10 #220

Workflow file for this run

name: eShopOnNServiceBus Build and Test
on: [push, pull_request, workflow_dispatch]
env:
CODE_COVERAGE_ARTIFACT_NAME: code-coverage-results
CODE_COVERAGE_ARTIFACT_PATH: code-coverage-results.md
jobs:
build:
runs-on: ubuntu-latest
outputs:
pr-number: ${{ steps.captureEventDetails.outputs.pr-number }}
code-coverage-artifact-name: ${{ env.CODE_COVERAGE_ARTIFACT_NAME }}
code-coverage-artifact-path: ${{ env.CODE_COVERAGE_ARTIFACT_PATH }}
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '9.0.x'
include-prerelease: true
- name: Build with dotnet
run: dotnet build ./eShopOnNServiceBus.sln --configuration Release
# See https://josh-ops.com/posts/github-code-coverage/
# Add coverlet.collector nuget package to test project - 'dotnet add <TestProject.cspoj> package coverlet
- name: Test with dotnet
run: dotnet test ./eShopOnNServiceBus.sln --no-restore --verbosity normal --collect:"XPlat Code Coverage" --logger trx --results-directory coverage
- name: Copy Coverage To Predictable Location
run: find coverage -type f -name coverage.cobertura.xml -exec cp -p {} coverage/coverage.cobertura.xml \;
- name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: coverage/coverage.cobertura.xml
badge: true
format: 'markdown'
output: 'both'
- name: Upload code coverage results artifact
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: ${{ env.CODE_COVERAGE_ARTIFACT_NAME }}
path: ${{ env.CODE_COVERAGE_ARTIFACT_PATH }}
retention-days: 1
- name: Capture the PR number - for build job output
id: captureEventDetails
shell: bash
env:
PR_NUMBER: ${{ github.event.number }}
run: echo pr-number=$PR_NUMBER >> $GITHUB_OUTPUT
- name: Save outputs to files
run: |
echo "${{ github.event.number }}" > pr_number.txt
echo "${{ env.CODE_COVERAGE_ARTIFACT_NAME }}" > artifact_name.txt
echo "${{ env.CODE_COVERAGE_ARTIFACT_PATH }}" > artifact_path.txt
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: workflow-outputs
path: |
pr_number.txt
artifact_name.txt
artifact_path.txt
retention-days: 1