Merge pull request #21 from davewalker5/FR-67-Job-Status-Report #123
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 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: 7.0.302 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
- 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_FlightRecorderDb" /o:"davewalker5" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | |
dotnet build --configuration Release src/FlightRecorderDb.sln | |
dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" | |
- name: Run unit tests and generate code coverage | |
run: dotnet test src/FlightRecorderDb.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/FlightRecorder.Tests/coverage/coverage.info |