fix(bulk-ops): exclude soft-deleted entities from column grid (#28653) [1.13] #18695
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
| # Copyright 2021 Collate | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: UI Checkstyle | |
| on: | |
| merge_group: | |
| pull_request_target: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| - labeled | |
| paths: | |
| - "openmetadata-ui/src/main/resources/ui/**" | |
| - "openmetadata-spec/src/main/resources/json/schema/**" | |
| - ".github/workflows/ui-checkstyle.yml" | |
| - openmetadata-ui/src/main/resources/ui/playwright/** | |
| - openmetadata-ui/src/main/resources/ui/eslint.config.mjs | |
| - "openmetadata-ui-core-components/src/main/resources/ui/**" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ui-checkstyle-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| UI_WORKING_DIRECTORY: openmetadata-ui/src/main/resources/ui | |
| CORE_COMPONENTS_WORKING_DIRECTORY: openmetadata-ui-core-components/src/main/resources/ui | |
| jobs: | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 0: Authorize | |
| # ────────────────────────────────────────────────────────────────────────── | |
| authorize: | |
| if: | | |
| github.event_name == 'merge_group' || | |
| (github.event_name == 'pull_request_target' && | |
| (github.event.action != 'labeled' || github.event.label.name == 'safe to test')) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Wait for the labeler | |
| uses: lewagon/wait-on-check-action@v1.3.4 | |
| if: ${{ github.event_name == 'pull_request_target' }} | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| check-name: Team Label | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| wait-interval: 90 | |
| - name: Verify PR labels | |
| uses: jesusvasquez333/verify-pr-label-action@v1.4.0 | |
| if: ${{ github.event_name == 'pull_request_target' }} | |
| with: | |
| github-token: "${{ secrets.GITHUB_TOKEN }}" | |
| valid-labels: "safe to test" | |
| pull-request-number: "${{ github.event.pull_request.number }}" | |
| disable-reviews: true | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Common setup steps reused across all parallel check jobs via a shared | |
| # composite-like pattern: each job does its own checkout + yarn install | |
| # (fast due to yarn cache from actions/setup-node). | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 1: Lint — ESLint + Prettier + Organise Imports (src) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| lint-src: | |
| needs: authorize | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.UI_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.UI_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Antlr4 CLI | |
| run: sudo make install_antlr_cli | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: Get changed src files | |
| id: changed-files | |
| uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 | |
| with: | |
| path: ${{ env.UI_WORKING_DIRECTORY }} | |
| files_ignore: | | |
| src/generated/** | |
| files: | | |
| src/**/*.{ts,tsx,js,jsx,json} | |
| - name: ESLint + Prettier + Organise Imports | |
| id: lint | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| env: | |
| CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
| run: | | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No added or modified files to process." | |
| exit 0 | |
| fi | |
| TS_FILES=$(echo "$CHANGED_FILES" | tr ' ' '\n' | awk '/\.(ts|tsx|js|jsx)$/ { printf "%s ", $0 }') | |
| if [ -n "$TS_FILES" ]; then | |
| yarn organize-imports:cli $TS_FILES | |
| fi | |
| yarn lint:base --fix $CHANGED_FILES | |
| yarn pretty:base --write $CHANGED_FILES | |
| if [ -n "$(git status --porcelain)" ]; then | |
| FILES=$(git status --porcelain | awk '{print " - `" $2 "`"}' | head -30) | |
| echo "changed_files<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$FILES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| git checkout -- . | |
| git clean -fd | |
| exit 1 | |
| fi | |
| - name: Find existing lint comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:lint-src -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:lint-src --> | |
| ### ❌ Lint Check Failed — ESLint + Prettier + Organise Imports (src) | |
| The following files have style issues that need to be fixed: | |
| ${{ steps.changed-files.outputs.all_changed_files }} | |
| **Fix locally (fast — only for changed files in the branch):** | |
| ```bash | |
| make ui-checkstyle-src-changed | |
| ``` | |
| Or to fix all files: | |
| ```bash | |
| make ui-checkstyle-src | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 2: Licence Header Check (all changed files) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| license-header: | |
| needs: authorize | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.UI_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.UI_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Antlr4 CLI | |
| run: sudo make install_antlr_cli | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: Get all changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 | |
| with: | |
| path: ${{ env.UI_WORKING_DIRECTORY }} | |
| - name: Licence Header Check | |
| id: license | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| env: | |
| CHANGED_FILES_ALL: ${{ steps.changed-files.outputs.all_changed_files }} | |
| run: | | |
| if [ -z "$CHANGED_FILES_ALL" ]; then | |
| echo "No added or modified files to process." | |
| exit 0 | |
| fi | |
| yarn license-header-fix $CHANGED_FILES_ALL | |
| if [ -n "$(git status --porcelain)" ]; then | |
| FILES=$(git status --porcelain | awk '{print " - `" $2 "`"}' | head -30) | |
| echo "changed_files<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$FILES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| git checkout -- . | |
| git clean -fd | |
| exit 1 | |
| fi | |
| - name: Find existing licence comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:license-header -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:license-header --> | |
| ### ❌ Licence Header Check Failed | |
| The following files are missing or have outdated licence headers: | |
| ${{ steps.changed-files.outputs.all_changed_files }} | |
| **Fix locally:** | |
| ```bash | |
| make license-header-fix | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 3: TypeScript Type Check (src) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| tsc-src: | |
| needs: authorize | |
| if: false # TODO: re-enable once tsc errors are resolved | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.UI_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.UI_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Antlr4 CLI | |
| run: sudo make install_antlr_cli | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: TypeScript Type Check (src) | |
| id: tsc | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: | | |
| if ! yarn tsc:check > /tmp/tsc_output.txt 2>&1; then | |
| ERRORS=$(head -50 /tmp/tsc_output.txt | sed 's/`/\`/g') | |
| echo "tsc_errors<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$ERRORS" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| exit 1 | |
| fi | |
| - name: Find existing tsc comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:tsc-src -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:tsc-src --> | |
| ### ❌ TypeScript Type Check Failed (src) | |
| <details> | |
| <summary>View type errors (first 50 lines)</summary> | |
| ``` | |
| ${{ steps.tsc.outputs.tsc_errors }} | |
| ``` | |
| </details> | |
| **Run locally to get details about typescript errors:** | |
| ```bash | |
| make tsc-src-fix | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 4: I18n Sync | |
| # ────────────────────────────────────────────────────────────────────────── | |
| i18n-sync: | |
| needs: authorize | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.UI_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.UI_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Antlr4 CLI | |
| run: sudo make install_antlr_cli | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: I18n Sync | |
| id: i18n | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: | | |
| yarn i18n | |
| if [ -n "$(git status --porcelain)" ]; then | |
| FILES=$(git status --porcelain | awk '{print " - `" $2 "`"}' | head -20) | |
| echo "changed_files<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$FILES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| git checkout -- . | |
| git clean -fd | |
| exit 1 | |
| fi | |
| - name: Find existing i18n comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:i18n-sync -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:i18n-sync --> | |
| ### ❌ I18n Sync Check Failed | |
| Translation files are out of sync. Changed files: | |
| ${{ steps.i18n.outputs.changed_files }} | |
| **Fix locally:** | |
| ```bash | |
| make i18n-sync-fix | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 5: generate:app-docs | |
| # ────────────────────────────────────────────────────────────────────────── | |
| app-docs: | |
| needs: authorize | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.UI_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.UI_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Antlr4 CLI | |
| run: sudo make install_antlr_cli | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: generate:app-docs | |
| id: docs | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: | | |
| yarn generate:app-docs | |
| if [ -n "$(git status --porcelain)" ]; then | |
| FILES=$(git status --porcelain | awk '{print " - `" $2 "`"}' | head -20) | |
| echo "changed_files<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$FILES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| git checkout -- . | |
| git clean -fd | |
| exit 1 | |
| fi | |
| - name: Find existing app-docs comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:app-docs -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:app-docs --> | |
| ### ❌ App Docs Check Failed | |
| Generated app docs are stale. Changed files: | |
| ${{ steps.docs.outputs.changed_files }} | |
| **Fix locally:** | |
| ```bash | |
| make generate-app-docs | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 6: Playwright — ESLint + Prettier + Organise Imports | |
| # ────────────────────────────────────────────────────────────────────────── | |
| lint-playwright: | |
| needs: authorize | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.UI_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.UI_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Antlr4 CLI | |
| run: sudo make install_antlr_cli | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: Get changed Playwright files | |
| id: changed-files | |
| uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 | |
| with: | |
| path: ${{ env.UI_WORKING_DIRECTORY }} | |
| files_ignore: | | |
| playwright/test-data/** | |
| files: | | |
| playwright/**/*.{ts,tsx,js,jsx} | |
| - name: ESLint + Prettier + Organise Imports (playwright) | |
| id: lint | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| env: | |
| CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
| run: | | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No added or modified files to process." | |
| exit 0 | |
| fi | |
| yarn organize-imports:cli $CHANGED_FILES | |
| yarn lint:base --fix $CHANGED_FILES | |
| yarn pretty:base --write $CHANGED_FILES | |
| if [ -n "$(git status --porcelain)" ]; then | |
| FILES=$(git status --porcelain | awk '{print " - `" $2 "`"}' | head -30) | |
| echo "changed_files<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$FILES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| git checkout -- . | |
| git clean -fd | |
| exit 1 | |
| fi | |
| - name: Find existing playwright lint comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:lint-playwright -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:lint-playwright --> | |
| ### ❌ Playwright Lint Check Failed — ESLint + Prettier + Organise Imports | |
| The following files have style issues that need to be fixed: | |
| ${{ steps.changed-files.outputs.all_changed_files }} | |
| **Fix locally (fast — only for changed files in the branch):** | |
| ```bash | |
| make ui-checkstyle-playwright-changed | |
| ``` | |
| Or to fix all playwright files: | |
| ```bash | |
| make ui-checkstyle-playwright | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 7: Playwright — TypeScript Type Check | |
| # ────────────────────────────────────────────────────────────────────────── | |
| tsc-playwright: | |
| needs: authorize | |
| if: false # TODO: re-enable once playwright tsc errors are resolved | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.UI_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.UI_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Antlr4 CLI | |
| run: sudo make install_antlr_cli | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: Get changed Playwright files | |
| id: changed-files | |
| uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 | |
| with: | |
| path: ${{ env.UI_WORKING_DIRECTORY }} | |
| files_ignore: | | |
| playwright/test-data/** | |
| files: | | |
| playwright/**/*.{ts,tsx,js,jsx} | |
| - name: TypeScript Type Check (playwright) | |
| id: tsc | |
| working-directory: ${{ env.UI_WORKING_DIRECTORY }} | |
| run: | | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No added or modified files to process." | |
| exit 0 | |
| fi | |
| if ! yarn tsc:playwright > /tmp/tsc_output.txt 2>&1; then | |
| ERRORS=$(head -50 /tmp/tsc_output.txt | sed 's/`/\`/g') | |
| echo "tsc_errors<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$ERRORS" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| exit 1 | |
| fi | |
| - name: Find existing playwright tsc comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:tsc-playwright -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:tsc-playwright --> | |
| ### ❌ TypeScript Type Check Failed (playwright) | |
| <details> | |
| <summary>View type errors (first 50 lines)</summary> | |
| ``` | |
| ${{ steps.tsc.outputs.tsc_errors }} | |
| ``` | |
| </details> | |
| **Run locally to get details about typescript errors::** | |
| ```bash | |
| make tsc-playwright-fix | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) | |
| # ────────────────────────────────────────────────────────────────────────── | |
| # Job 8: Core Components — ESLint + Prettier | |
| # ────────────────────────────────────────────────────────────────────────── | |
| lint-core-components: | |
| needs: authorize | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'merge_group' && github.sha || github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "${{ env.CORE_COMPONENTS_WORKING_DIRECTORY }}/.nvmrc" | |
| cache: yarn | |
| cache-dependency-path: "${{ env.CORE_COMPONENTS_WORKING_DIRECTORY }}/yarn.lock" | |
| - name: Install Yarn Packages | |
| working-directory: ${{ env.CORE_COMPONENTS_WORKING_DIRECTORY }} | |
| run: yarn install --frozen-lockfile | |
| - name: Get changed core-components files | |
| id: changed-files | |
| uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 | |
| with: | |
| path: ${{ env.CORE_COMPONENTS_WORKING_DIRECTORY }} | |
| files: | | |
| src/**/*.{ts,tsx,js,jsx,json} | |
| - name: ESLint + Prettier (core-components) | |
| id: lint | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ${{ env.CORE_COMPONENTS_WORKING_DIRECTORY }} | |
| env: | |
| CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
| run: | | |
| if [ -z "${CHANGED_FILES// }" ]; then | |
| echo "No added or modified files to process." | |
| exit 0 | |
| fi | |
| yarn lint:base --fix $CHANGED_FILES | |
| yarn pretty:base --write $CHANGED_FILES | |
| if [ -n "$(git status --porcelain)" ]; then | |
| FILES=$(git status --porcelain | awk '{print " - `" $2 "`"}' | head -30) | |
| echo "changed_files<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$FILES" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| git checkout -- . | |
| git clean -fd | |
| exit 1 | |
| fi | |
| - name: Find existing lint comment | |
| if: ${{ always() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/find-comment@v3 | |
| id: fc | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: github-actions[bot] | |
| body-includes: '<!-- check:lint-core-components -->' | |
| - name: Post failure comment | |
| if: ${{ failure() && github.event_name == 'pull_request_target' }} | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| comment-id: ${{ steps.fc.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| <!-- check:lint-core-components --> | |
| ### ❌ Lint Check Failed — ESLint + Prettier (core-components) | |
| The following files have style issues that need to be fixed: | |
| ${{ steps.changed-files.outputs.all_changed_files }} | |
| **Fix locally (fast — only for changed files in the branch):** | |
| ```bash | |
| make ui-checkstyle-core-components-changed | |
| ``` | |
| Or to fix all files: | |
| ```bash | |
| make ui-checkstyle-core-components | |
| ``` | |
| edit-mode: replace | |
| - name: Delete comment on success | |
| if: ${{ success() && steps.fc.outputs.comment-id != '' && github.event_name == 'pull_request_target' }} | |
| uses: actions/github-script@v7 | |
| env: | |
| COMMENT_ID: ${{ steps.fc.outputs.comment-id }} | |
| with: | |
| script: | | |
| github.rest.issues.deleteComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: process.env.COMMENT_ID | |
| }) |