Skip to content

build(deps): bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.0 in /… #434

build(deps): bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.0 in /…

build(deps): bump Microsoft.NET.Test.Sdk from 17.10.0 to 17.11.0 in /… #434

name: Build pull requests
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [ "main" ]
paths-ignore:
- 'tools/**'
- '.github/**'
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.201
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install SonarCloud scanner
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet tool install --global dotnet-coverage
- name: Start sonarcloud scanner
run: |
dotnet sonarscanner begin /k:"alexsee_bsh3" /o:"alexsee" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
working-directory: ./src
- name: Build application
run: |
dotnet build --configuration Release
working-directory: ./src
- name: Test application and collect coverage
run: |
dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml'
working-directory: ./src
- name: Finish the sonar cloud scanner
run: dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
working-directory: ./src