Merge pull request #628 from louisaxel-ambroise/dependabot/nuget/MSTe… #1461
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 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '9.0' | |
include-prerelease: True | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal -c Debug --collect:"XPlat Code Coverage" | |
- name: Move Coverage files | |
run: mv tests/FasTnT.Host.Tests/TestResults/*/coverage.cobertura.xml tests/FasTnT.Host.Tests/; mv tests/FasTnT.Application.Tests/TestResults/*/coverage.cobertura.xml tests/FasTnT.Application.Tests/; mv tests/FasTnT.IntegrationTests/TestResults/*/coverage.cobertura.xml tests/FasTnT.IntegrationTests/ | |
- name: Upload Coverage | |
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r tests/FasTnT.Host.Tests/coverage.cobertura.xml -r tests/FasTnT.Application.Tests/coverage.cobertura.xml -r tests/FasTnT.IntegrationTests/coverage.cobertura.xml | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} |