Merge remote-tracking branch 'origin/master' into feature/issue-6-Han… #76
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: .NET CI | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, edited] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dotnet tools | |
run: | | |
dotnet tool install --global dotnet-sonarscanner | |
dotnet tool install --global dotnet-coverage | |
- name: Begin analysis on SonarCloud | |
run: | | |
dotnet sonarscanner begin /k:"steven-r_Oberon0Compiler" /o:"steven-r-github" /d:sonar.branch.name=$BRANCH_NAME /d:sonar.host.url="https://sonarcloud.io" /d:sonar.token=${{ secrets.SONAR_SECRET }} /d:sonar.pullrequest.provider=github /d:sonar.dotnet.excludeTestProjects=true /d:sonar.cs.vscoveragexml.reportsPaths=**/dynamic-coverage-*.xml #/d:sonar.verbose=true | |
- name: Build | |
run: dotnet build | |
- name: Run Tests (with Coverage) | |
run: | | |
dotnet-coverage collect 'dotnet test --no-build --verbosity normal' -f xml -o dynamic-coverage-std.xml | |
- name: End analysis on SonarCloud | |
run: | | |
dotnet sonarscanner end /d:sonar.token=${{ secrets.SONAR_SECRET }} |