Merge pull request #6 from paa-listas/feature-logout #7
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: CI Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pull-requests: write | |
env: | |
DOTNET_NOLOGO: true # Disable the .NET logo in the console output | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience to skip caching NuGet packages and speed up the build | |
DOTNET_CLI_TELEMETRY_OPTOUT: true # Disable sending .NET CLI telemetry to Microsoft | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: CI Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore Dependencies | |
run: dotnet restore Primary.sln | |
- name: Build | |
run: dotnet build Primary.sln --configuration Release --no-restore | |
- name: Test | |
run: dotnet test Primary.sln --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage | |
- name: Copy Coverage To Predictable Location | |
run: cp coverage/**/coverage.cobertura.xml coverage.cobertura.xml | |
- name: Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: coverage.cobertura.xml | |
badge: true | |
format: 'md' | |
output: 'both' | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
- name: Upload Coverage Artifact | |
uses: actions/[email protected] | |
with: | |
name: test-coverage-report | |
path: | | |
coverage.cobertura.xml | |
code-coverage-results.md | |
- name: Upload Nuget Artifact | |
uses: actions/[email protected] | |
with: | |
name: ci-nugets | |
path: Primary/bin/Release/Primary*.nupkg |