Skip to content

Update Build to .NET 8.0.204 #350

Update Build to .NET 8.0.204

Update Build to .NET 8.0.204 #350

name: .NET Core CI Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.204
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 19
- name: Run unit tests and generate code coverage
run: dotnet test src/MusicCatalogue.sln /p:CollectCoverage=true /p:CoverletOutput=coverage/ /p:CoverletOutputFormat=lcov
- name: Generage Coveralls code coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: src/MusicCatalogue.Tests/coverage/coverage.info
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Install SonarCloud scanners
run: |
dotnet tool install --global dotnet-sonarscanner
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
dotnet-sonarscanner begin /k:"davewalker5_MusicCatalogue" /o:"davewalker5" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build --configuration Release src/MusicCatalogue.sln
dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"