test #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build F# Nerddeck | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ${{ github.workspace }}/fsharp/NerdDeckFSharp | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Build F# | |
run: dotnet build | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
defaults: | |
run: | |
working-directory: ${{ github.workspace }}/fsharp/NerdDeckFSharp | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.0.x' | |
- name: Test F# | |
run: | | |
echo "## ❔ Test results" >> $GITHUB_STEP_SUMMARY | |
dotnet test --configuration Release -v minimal --no-build --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=$/coverage.json;CoverletOutput=$/coverage' -- RunConfiguration.CollectSourceInformation=true | |
dotnet test --configuration Release -v minimal --no-build --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=$/coverage.json;CoverletOutput=$/coverage' -- RunConfiguration.CollectSourceInformation=true | |
working-directory: /fsharp/NerdDeckFSharp | |
- name: 📝 Code Coverage report | |
run: | | |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.1.23 | |
reportgenerator -reports:${{github.workspace}}/coverage.cobertura.xml -targetdir:${{github.workspace}}/report -reporttypes:MarkdownSummaryGithub "-filefilters:-*.g.cs;-*.gen.cs" -verbosity:Warning | |
sed -i 's/# Summary/## 📝 Code Coverage/g' ${{github.workspace}}/report/SummaryGithub.md | |
sed -i 's/## Coverage/### Code Coverage details/g' ${{github.workspace}}/report/SummaryGithub.md | |
cat ${{github.workspace}}/report/*.md >> $GITHUB_STEP_SUMMARY |