chore(deps-dev): bump typescript from 5.9.3 to 6.0.2 in /ui #501
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: UI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "ui/**" | |
| - ".github/workflows/ui.yml" | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths: | |
| - "ui/**" | |
| - ".github/workflows/ui.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' || !github.event.pull_request.draft | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| cache-dependency-path: ui/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: ui | |
| - name: Typecheck | |
| run: npx tsc --noEmit | |
| working-directory: ui | |
| - name: Lint | |
| run: npx eslint src/ | |
| working-directory: ui | |
| - name: Test with coverage | |
| run: npm run test:coverage | |
| working-directory: ui | |
| - name: Build | |
| run: npm run build | |
| working-directory: ui | |
| - name: Upload coverage summary | |
| uses: actions/upload-artifact@v7 | |
| if: github.ref_name == 'main' | |
| with: | |
| name: ui-coverage | |
| path: ui/coverage/coverage-summary.json | |
| - name: Download base coverage | |
| id: download-base-coverage | |
| if: github.event_name == 'pull_request' | |
| uses: dawidd6/action-download-artifact@v20 | |
| with: | |
| branch: main | |
| workflow_conclusion: success | |
| name: ui-coverage | |
| path: ui/coverage-base/ | |
| if_no_artifact_found: warn | |
| - name: Coverage report | |
| if: github.event_name == 'pull_request' | |
| uses: davelosert/vitest-coverage-report-action@v2 | |
| with: | |
| working-directory: ui | |
| json-summary-compare-path: ${{ steps.download-base-coverage.outputs.found_artifact == 'true' && 'coverage-base/coverage-summary.json' || '' }} | |
| - name: Push coverage badge | |
| if: github.ref_name == 'main' | |
| run: | | |
| COVERAGE=$(node -p "require('./ui/coverage/coverage-summary.json').total.lines.pct") | |
| if (( $(echo "$COVERAGE >= 80" | bc -l) )); then | |
| COLOR="brightgreen" | |
| elif (( $(echo "$COVERAGE >= 60" | bc -l) )); then | |
| COLOR="yellow" | |
| else | |
| COLOR="red" | |
| fi | |
| cd "$(mktemp -d)" | |
| git init | |
| git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| git fetch origin badges --depth=1 | |
| git checkout badges | |
| printf '{"schemaVersion":1,"label":"UI coverage","message":"%s%%","color":"%s"}\n' "$COVERAGE" "$COLOR" > ui-coverage.json | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add ui-coverage.json | |
| git diff --staged --quiet || (git commit -m "Update UI coverage badge" && git push origin badges) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |