Test indicators #7
Workflow file for this run
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" | |
run-name: Test indicators | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "src/**" | |
pull_request: | |
branches: ["main"] | |
paths: | |
- "src/**" | |
- ".github/workflows/build-indicators.yml" | |
jobs: | |
testing: | |
name: test indicators | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clean Workspace Folder | |
run: | | |
rm -rf ./* || true | |
rm -rf ./.??* || true | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "7.x" | |
dotnet-quality: "ga" | |
- name: Build solution | |
run: > | |
dotnet build | |
--configuration Release | |
--property:ContinuousIntegrationBuild=true | |
-warnAsError | |
- name: Test indicators | |
run: > | |
dotnet test tests/indicators/Tests.Indicators.csproj | |
--configuration Release | |
--no-build | |
--verbosity normal | |
--logger trx | |
--collect:"XPlat Code Coverage" | |
--results-directory ./test-results | |
- name: Test other items | |
run: > | |
dotnet test tests/other/Tests.Other.csproj | |
--configuration Release | |
--no-build | |
--verbosity normal | |
--logger trx | |
--results-directory ./test-results | |
- name: Update PR tests summary | |
uses: bibipkins/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
comment-title: "" | |
results-path: ./test-results/**/*.trx | |
coverage-path: ./test-results/**/coverage.cobertura.xml | |
coverage-type: cobertura | |
coverage-threshold: 95 | |
- name: Code coverage summary | |
uses: irongut/[email protected] | |
with: | |
filename: ./test-results/**/coverage.cobertura.xml | |
badge: true | |
thresholds: '95 98' | |
fail_below_min: true | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: false | |
indicators: true | |
output: both | |
- name: Update PR coverage summmary | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
- name: Save test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: coverage | |
if: ${{ always() }} |