[Snyk] Security upgrade MSTest.TestAdapter from 2.2.10 to 3.2.0 #85
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- main | |
- release/* | |
pull_request: | |
branches: | |
- master | |
- main | |
- release/* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Add Report generator to tools | |
run: | | |
dotnet tool install -g dotnet-reportgenerator-globaltool | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: | | |
dotnet test --configuration Release --no-build --no-restore --verbosity normal --logger trx --collect:"XPlat Code Coverage" --results-directory ./coverage | |
# as we have multiple test projects we need to combine them into one | |
- name: Create code coverage report | |
run: reportgenerator -reports:./**/coverage.cobertura.xml -targetdir:./CodeCoverage -reporttypes:'Cobertura' | |
# If only running one test project we could just compy the one to the proper location | |
#- name: Copy Coverage To Predictable Location | |
# run: cp coverage/*/coverage.cobertura.xml coverage/coverage.cobertura.xml | |
# note that irongut/CodeCoverageSummary only runs on linux | |
- name: Code Coverage Summary Report | |
uses: irongut/CodeCoverageSummary@v1.0.2 | |
with: | |
# The one code coverage file | |
filename: ./CodeCoverage/Cobertura.xml | |
badge: true | |
format: 'markdown' | |
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: Git Version | |
# You may pin to the exact commit or the version. | |
# uses: codacy/git-version@fa06788276d7492a2af01662649696d249ecf4cb | |
uses: codacy/git-version@2.4.0 | |
with: | |
# The name of the release branch | |
release-branch: master # default is master | |
# The name of the dev branch | |
dev-branch: develop # default is dev | |
# The prefix to use in the version | |
prefix: CICD-Testing # optional | |
# The paths to be used to calculate changes (comma-separated) | |
log-paths: ./ # optional, default is ./ |