Fix restore obsolete setting #249
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Install SonarScanner | |
#run: choco install "sonarscanner-msbuild-net50" -y | |
run: dotnet tool install --global dotnet-sonarscanner | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore ATL.unit-test | |
- name: Run SonarScanner | |
run: dotnet sonarscanner begin /k:"Zeugma440_atldotnet" /o:"zeugma440-github" /d:"sonar.host.url=https://sonarcloud.io" /d:"sonar.token=${{ secrets.SONAR_TOKEN }}" /d:sonar.sourceEncoding="UTF-8" /d:sonar.cs.opencover.reportsPaths="${GITHUB_WORKSPACE}/ATL.unit-test/lcov.info" | |
- name: Test | |
run: dotnet test ATL.unit-test --verbosity normal --results-directory "TestResults" | |
- name: Coverlet coverage test | |
uses: b3b00/[email protected] | |
with: | |
testProject: 'ATL.unit-test/ATL.unit-test.csproj' | |
output: 'lcov.info' | |
outputFormat: 'opencover' | |
excludes: '[program]*,[test]test.*' | |
threshold: 80 | |
# - name: CodeCov | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# files: ${{steps.coverlet.outputs.coverageFile}} | |
# fail_ci_if_error: true # optional (default = false) | |
# verbose: true # optional (default = false) | |
- name: Upload to SonarScanner | |
run : dotnet sonarscanner end /d:"sonar.token=${{ secrets.SONAR_TOKEN }}" |