RiverBreakoutTabs + Card layout adjustments #840
Workflow file for this run
This file contains hidden or 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: Unit test coverage diff | |
| on: | |
| pull_request: | |
| paths: | |
| - 'packages/react/**' | |
| - '.github/workflows/ui_test_diff_comment.yml' | |
| jobs: | |
| coverage-diff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout current branch | |
| uses: actions/checkout@v6 | |
| with: | |
| path: current | |
| - name: Checkout main branch | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| path: main | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.14.1 | |
| - name: Cache dependencies (current) | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-current-${{ hashFiles('current/**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-current- | |
| - name: Cache dependencies (main) | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-node-main-${{ hashFiles('main/**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-main- | |
| - name: Install dependencies (current branch) | |
| working-directory: current | |
| run: npm ci | |
| - name: Install dependencies (main branch) | |
| working-directory: main | |
| run: npm ci | |
| - name: Run tests with coverage (current branch) | |
| working-directory: current/packages/react | |
| run: npm run test -- --coverage --coverageReporters=json-summary --coverageReporters=json --passWithNoTests --watchAll=false | |
| - name: Run tests with coverage (main branch) | |
| working-directory: main/packages/react | |
| run: npm run test -- --coverage --coverageReporters=json-summary --coverageReporters=json --passWithNoTests --watchAll=false | |
| - name: Generate coverage diff comment | |
| id: coverage-diff | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const { execSync } = require('child_process'); | |
| const output = execSync('npm exec -- tsx packages/repo-configs/scripts/get-coverage.ts', { | |
| encoding: 'utf8', | |
| cwd: 'current' | |
| }); | |
| core.setOutput('comment-body', output.trim()); | |
| return output; | |
| - name: Post coverage diff comment | |
| uses: phulsechinmay/rewritable-pr-comment@a1b041997fa84ec3e524ee9dee5ba0b5f4e73604 # v0.3.0 | |
| with: | |
| message: ${{ steps.coverage-diff.outputs.comment-body }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMENT_IDENTIFIER: 'test-coverage-diff' |