name: 'UI: Tests' on: push: branches: - 'master' - 'v5.*' pull_request: branches: - 'master' - 'v5.*' concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true env: UI_WORKING_DIR: ./ui NODE_VERSION: '20.x' jobs: ui-tests: runs-on: ubuntu-latest timeout-minutes: 20 permissions: contents: read defaults: run: working-directory: ./ui steps: - name: Checkout repository uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Check for UI changes id: check-changes uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1 with: files: | ui/** .github/workflows/ui-tests.yml files_ignore: | ui/CHANGELOG.md ui/README.md ui/AGENTS.md - name: Setup Node.js ${{ env.NODE_VERSION }} if: steps.check-changes.outputs.any_changed == 'true' uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Setup pnpm if: steps.check-changes.outputs.any_changed == 'true' uses: pnpm/action-setup@v4 with: version: 10 run_install: false - name: Get pnpm store directory if: steps.check-changes.outputs.any_changed == 'true' shell: bash run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - name: Setup pnpm cache if: steps.check-changes.outputs.any_changed == 'true' uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 with: path: ${{ env.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('ui/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: Install dependencies if: steps.check-changes.outputs.any_changed == 'true' run: pnpm install --frozen-lockfile - name: Run healthcheck if: steps.check-changes.outputs.any_changed == 'true' run: pnpm run healthcheck - name: Build application if: steps.check-changes.outputs.any_changed == 'true' run: pnpm run build