feat: TMS-28326: add the suite description to the section step for Qa… #162
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: Validate | |
on: | |
pull_request | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: [ | |
./Migrators/AllureExporter, | |
./Migrators/AzureExporter, | |
./Migrators/ZephyrScaleExporter, | |
./Migrators/ZephyrSquadExporter, | |
./Migrators/XRayExporter, | |
./Migrators/TestCollabExporter, | |
./Migrators/TestLinkExporter, | |
./Migrators/TestRailExporter, | |
./Migrators/PractiTestExporter, | |
./Migrators/SpiraTestExporter, | |
./Migrators/HPALMExporter, | |
./Migrators/Importer | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8 | |
- name: Restore dependencies | |
run: dotnet restore ${{ matrix.project }} | |
- name: Build project | |
run: dotnet build --no-restore ${{ matrix.project }} | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
project: [ | |
# ./Migrators/AllureExporterTests, | |
./Migrators/AzureExporterTests, | |
./Migrators/ZephyrScaleExporterTests, | |
./Migrators/ZephyrSquadExporterTests, | |
./Migrators/XRayExporterTests, | |
./Migrators/TestCollabExporterTests, | |
./Migrators/TestLinkExporterTests, | |
# ./Migrators/TestRailExporterTests, | |
./Migrators/PractiTestExporterTests, | |
./Migrators/SpiraTestExporterTests, | |
./Migrators/HPALMExporterTests, | |
# ./Migrators/ImporterTests | |
] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8 | |
- name: Restore dependencies | |
run: dotnet restore ${{ matrix.project }} | |
- name: Build project | |
run: dotnet test ${{ matrix.project }} --verbosity normal --collect:"XPlat Code Coverage" --logger trx --results-directory coverage | |
- name: Code Coverage Summary Report | |
uses: irongut/[email protected] | |
with: | |
filename: 'coverage/*/coverage.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: | |
header: ${{ matrix.project }} | |
hide_and_recreate: true | |
path: code-coverage-results.md | |
# - name: Write to Job Summary | |
# run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | |
- name: Create code coverage report | |
run: | | |
dotnet tool install -g dotnet-reportgenerator-globaltool | |
reportgenerator -reports:coverage/*/coverage.cobertura.xml -targetdir:CodeCoverage -reporttypes:MarkdownSummaryGithub | |
- name: Write to Job Summary | |
run: cat CodeCoverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY |