LEGO: Pull request from users/loc/juno/hb_e8128129-2d33-4a21-9e80-44e341aa730f_20250109032518443 to main #1955
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: Generate Coverage Report | |
on: | |
# push: | |
# branches: [coverageReport] | |
pull_request: | |
branches: [main, dev/*, hotfix/*] | |
jobs: | |
pr-coverage: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- name: 'Checkout Github Action' | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
- name: Cache turbo build setup | |
uses: actions/cache@v4 | |
with: | |
path: .turbo | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9.1.3 | |
run_install: | | |
- recursive: true | |
args: [--frozen-lockfile, --strict-peer-dependencies] | |
- name: Run lib unit tests | |
run: pnpm turbo run test:lib --cache-dir=.turbo | |
- name: Run extension unit tests | |
run: pnpm turbo run test:extension-unit --cache-dir=.turbo | |
- name: Create code coverage report | |
run: | | |
dotnet tool install -g dotnet-reportgenerator-globaltool | |
reportgenerator -reports:"libs/*/coverage/cobertura-coverage.xml;apps/vs-code-designer/coverage/cobertura-coverage.xml" -targetdir:CodeCoverage -reporttypes:'Cobertura;MarkdownSummaryGithub' | |
- name: Generate Coverage Report | |
uses: clearlyip/code-coverage-report-action@v4 | |
id: code_coverage_report_action | |
with: | |
#Location of the generate coverage file | |
filename: 'CodeCoverage/Cobertura.xml' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
badge: true | |
fail_on_negative_difference: false | |
artifact_download_workflow_names: 'base-coverage' | |
- name: Write to Job Summary | |
run: cat CodeCoverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY | |
- run: node ./filterCoverageMarkdown.js | |
# - name: Add Coverage PR Comment | |
# #Make sure the report was generated and that the event is actually a pull request, run if failed or success | |
# uses: marocchino/sticky-pull-request-comment@v2 | |
# if: steps.code_coverage_report_action.outputs.file != '' && github.event_name == 'pull_request' && (success() || failure()) | |
# with: | |
# recreate: true | |
# path: code-coverage-results.md |