[UIK-2976] ellipsis improvements #10973
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: cd | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| branches: [master, major/16] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| defineChangedComponents: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| changedComponents: ${{ steps.pkg-diff.outputs.changed }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Install Node.js | |
| uses: actions/[email protected] | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/[email protected] | |
| name: Install pnpm | |
| id: pnpm-install | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Define changed components | |
| id: pkg-diff | |
| run: | | |
| git fetch origin ${{ github.event.pull_request.base.ref }} | |
| echo "changed=$(BASE=origin/${{ github.event.pull_request.base.ref }} pnpm pkg-diff | tail -n 1)" >> $GITHUB_OUTPUT | |
| - name: Set labels | |
| if: steps.pkg-diff.outputs.changed != '' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CHANGED: ${{ steps.pkg-diff.outputs.changed }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| EXISTING_LABELS=$(gh label list --repo "$REPO" --limit 100 --json name --jq '.[].name') | |
| PR_LABELS=$(gh pr view "$PR_NUMBER" --repo "$REPO" --json labels --jq '.labels[].name') | |
| PR_LABELS_LIST=$(echo "$PR_LABELS" | tr '\n' ' ') | |
| CHANGED_COMPONENTS=$(echo "$CHANGED" | tr ' ' '\n') | |
| LABELS_TO_REMOVE="" | |
| LABELS_TO_ADD="" | |
| echo CHANGED: "$CHANGED" | |
| for LABEL in $CHANGED; do | |
| if ! echo "$EXISTING_LABELS" | grep -qx "$LABEL"; then | |
| echo "Creating label '$LABEL'" | |
| gh label create "$LABEL" --repo "$REPO" | |
| fi | |
| if ! echo "$PR_LABELS" | grep -qx "$LABEL"; then | |
| LABELS_TO_ADD="$LABELS_TO_ADD,$LABEL" | |
| fi | |
| done | |
| for LABEL in $PR_LABELS_LIST; do | |
| if ! echo "$CHANGED_COMPONENTS" | grep -qx "$LABEL"; then | |
| LABELS_TO_REMOVE="$LABELS_TO_REMOVE,$LABEL" | |
| fi | |
| done | |
| LABELS_TO_ADD="${LABELS_TO_ADD#","}" | |
| LABELS_TO_REMOVE="${LABELS_TO_REMOVE#","}" | |
| echo ADD: "$LABELS_TO_ADD" | |
| echo REMOVE: "$LABELS_TO_REMOVE" | |
| if [ -n $LABELS_TO_REMOVE ]; then | |
| gh pr edit "$PR_NUMBER" --remove-label "$LABELS_TO_REMOVE" --repo "$REPO" | |
| fi | |
| if [ -n $LABELS_TO_ADD ]; then | |
| gh pr edit "$PR_NUMBER" --add-label "$LABELS_TO_ADD" --repo "$REPO" | |
| fi | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: defineChangedComponents | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Install Node.js | |
| uses: actions/[email protected] | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/[email protected] | |
| name: Install pnpm | |
| id: pnpm-install | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| enableCrossOsArchive: true | |
| - name: Cache build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| with: | |
| path: | | |
| semcore/*/lib | |
| tools/*/lib | |
| semcore/icon/**/*.js | |
| semcore/icon/**/*.mjs | |
| semcore/icon/**/*.d.ts | |
| semcore/illustration/**/*.js | |
| semcore/illustration/**/*.mjs | |
| semcore/illustration/**/*.d.ts | |
| key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| enableCrossOsArchive: true | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Build | |
| if: steps.cache-build.outputs.cache-hit != 'true' | |
| run: | | |
| pnpm build | |
| static-lint: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Install Node.js | |
| uses: actions/[email protected] | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/[email protected] | |
| name: Install pnpm | |
| id: pnpm-install | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| enableCrossOsArchive: true | |
| - name: Restore cached build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| with: | |
| path: | | |
| semcore/*/lib | |
| tools/*/lib | |
| semcore/icon/**/*.js | |
| semcore/icon/**/*.mjs | |
| semcore/icon/**/*.d.ts | |
| semcore/illustration/**/*.js | |
| semcore/illustration/**/*.mjs | |
| semcore/illustration/**/*.d.ts | |
| key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| enableCrossOsArchive: true | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm lint | |
| docs-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| - uses: errata-ai/vale-action@reviewdog | |
| name: Run Vale | |
| continue-on-error: true | |
| with: | |
| files: README.md CONTRIBUTING.md semcore/*/README.md semcore/*/CHANGELOG.md website/docs | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| needs: [build, defineChangedComponents] | |
| if: ${{ needs.defineChangedComponents.outputs.changedComponents != '' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Install Node.js | |
| uses: actions/[email protected] | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/[email protected] | |
| name: Install pnpm | |
| id: pnpm-install | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| enableCrossOsArchive: true | |
| - name: Restore cached build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| with: | |
| path: | | |
| semcore/*/lib | |
| tools/*/lib | |
| semcore/icon/**/*.js | |
| semcore/icon/**/*.mjs | |
| semcore/icon/**/*.d.ts | |
| semcore/illustration/**/*.js | |
| semcore/illustration/**/*.mjs | |
| semcore/illustration/**/*.d.ts | |
| key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| enableCrossOsArchive: true | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile | |
| - name: Test setup | |
| id: test-setup | |
| run: pnpm test:setup | |
| - name: Test | |
| id: test | |
| env: | |
| CHANGED_COMPONENTS: ${{ needs.defineChangedComponents.outputs.changedComponents }} | |
| run: pnpm test:docker run $CHANGED_COMPONENTS -- --allowOnly=false | |
| continue-on-error: true | |
| - name: Save test results as artifacts | |
| if: steps.test.outcome != 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit-testing-failure-output | |
| path: semcore/*/__tests__/__image_snapshots__/__diff_output__/ | |
| retention-days: 3 | |
| - name: Fail if test step actually failed | |
| if: steps.test.outcome != 'success' | |
| run: exit 1 | |
| # a11y-tests: | |
| # runs-on: macos-14 | |
| # needs: build | |
| # steps: | |
| # - uses: actions/[email protected] | |
| # - name: Install Node.js | |
| # uses: actions/[email protected] | |
| # with: | |
| # node-version: 22 | |
| # - uses: pnpm/[email protected] | |
| # name: Install pnpm | |
| # id: pnpm-install | |
| # with: | |
| # version: 10.11.1 | |
| # run_install: false | |
| # - name: Get pnpm store directory | |
| # id: pnpm-cache | |
| # run: | | |
| # echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| # - uses: actions/cache@v4 | |
| # name: Setup pnpm cache | |
| # with: | |
| # path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| # key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| # - name: Restore cached build | |
| # uses: actions/cache@v4 | |
| # id: cache-build | |
| # with: | |
| # path: | | |
| # semcore/*/lib | |
| # tools/*/lib | |
| # semcore/icon/**/*.js | |
| # semcore/icon/**/*.mjs | |
| # semcore/icon/**/*.d.ts | |
| # semcore/illustration/**/*.js | |
| # semcore/illustration/**/*.mjs | |
| # semcore/illustration/**/*.d.ts | |
| # key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| # - name: Install dependencies | |
| # run: | | |
| # pnpm install --frozen-lockfile | |
| # - name: Install Browser | |
| # run: npx playwright install webkit | |
| # - name: Enable VoiceOver Automation | |
| # uses: guidepup/[email protected] | |
| # - name: Voice Over testing | |
| # id: a11y-testing | |
| # uses: nick-fields/[email protected] | |
| # with: | |
| # timeout_minutes: 40 | |
| # max_attempts: 3 | |
| # command: pnpm run vo-test:ci | |
| # continue-on-error: true | |
| # - name: Save test results as artifacts | |
| # if: steps.a11y-testing.outcome != 'success' | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: a11y-testing-failure-output | |
| # path: test-results | |
| # retention-days: 3 | |
| # - name: Fail if test step actually failed | |
| # if: steps.a11y-testing.outcome != 'success' | |
| # run: exit 1 | |
| browser-tests-visual: | |
| runs-on: ubuntu-latest | |
| needs: [ build, defineChangedComponents ] | |
| if: ${{ needs.defineChangedComponents.outputs.changedComponents != '' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| browser: [chromium, firefox, webkit] | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.48.2-jammy | |
| options: --ipc=host # Needed for Chromium sandboxing | |
| steps: | |
| - name: Install Git | |
| run: apt-get update && apt-get install -y git | |
| - uses: actions/[email protected] | |
| with: | |
| token: ${{ secrets.BOT_ACCOUNT_GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Mark workspace as safe | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - uses: pnpm/[email protected] | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| enableCrossOsArchive: true | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Install Browser | |
| run: npx playwright install --with-deps | |
| - name: Restore cached build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| with: | |
| path: | | |
| semcore/*/lib | |
| tools/*/lib | |
| semcore/icon/**/*.js | |
| semcore/icon/**/*.mjs | |
| semcore/icon/**/*.d.ts | |
| semcore/illustration/**/*.js | |
| semcore/illustration/**/*.mjs | |
| semcore/illustration/**/*.d.ts | |
| key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| enableCrossOsArchive: true | |
| - name: Build basic packages | |
| if: steps.cache-build.outputs.cache-hit != 'true' | |
| run: | | |
| pnpm --filter @semcore/core build | |
| pnpm --filter @semcore/base-components build | |
| pnpm build:icons | |
| pnpm build:illustration | |
| - name: Browser testing (Visual tests - ${{ matrix.browser }}) | |
| id: browser-testing-visual | |
| env: | |
| CHANGED_COMPONENTS: ${{ needs.defineChangedComponents.outputs.changedComponents }} | |
| run: HOME=/root pnpm playwright test --config playwright.browser.config.ts --grep "@visual" --project=${{ matrix.browser }} $CHANGED_COMPONENTS | |
| continue-on-error: true | |
| - name: Save test results as artifacts | |
| if: steps.browser-testing-visual.outcome != 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: browser-testing-visual-${{ matrix.browser }}-failure-output | |
| path: test-results | |
| retention-days: 3 | |
| - name: Fail if test step actually failed | |
| if: steps.browser-testing-visual.outcome != 'success' | |
| run: exit 1 | |
| browser-tests-functional: | |
| runs-on: ubuntu-latest | |
| needs: [ build, defineChangedComponents ] | |
| if: ${{ needs.defineChangedComponents.outputs.changedComponents != '' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| browser: [chromium, firefox, webkit] | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.48.2-jammy | |
| options: --ipc=host # Needed for Chromium sandboxing | |
| steps: | |
| - name: Install Git | |
| run: apt-get update && apt-get install -y git | |
| - uses: actions/[email protected] | |
| with: | |
| token: ${{ secrets.BOT_ACCOUNT_GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Mark workspace as safe | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - uses: pnpm/[email protected] | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Install Browser | |
| run: npx playwright install --with-deps | |
| - name: Restore cached build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| with: | |
| path: | | |
| semcore/*/lib | |
| tools/*/lib | |
| semcore/icon/**/*.js | |
| semcore/icon/**/*.mjs | |
| semcore/icon/**/*.d.ts | |
| semcore/illustration/**/*.js | |
| semcore/illustration/**/*.mjs | |
| semcore/illustration/**/*.d.ts | |
| key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| - name: Build basic packages | |
| if: steps.cache-build.outputs.cache-hit != 'true' | |
| run: | | |
| pnpm --filter @semcore/core build | |
| pnpm --filter @semcore/base-components build | |
| pnpm build:icons | |
| pnpm build:illustration | |
| - name: Browser testing (Functional tests - ${{ matrix.browser }}) | |
| id: browser-testing-functional | |
| env: | |
| CHANGED_COMPONENTS: ${{ needs.defineChangedComponents.outputs.changedComponents }} | |
| run: HOME=/root pnpm playwright test --config playwright.browser.config.ts --grep "@functional" --project=${{ matrix.browser }} $CHANGED_COMPONENTS | |
| continue-on-error: true | |
| - name: Save test results as artifacts | |
| if: steps.browser-testing-functional.outcome != 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: browser-testing-functional-${{ matrix.browser }}-failure-output | |
| path: test-results | |
| retention-days: 3 | |
| - name: Fail if test step actually failed | |
| if: steps.browser-testing-functional.outcome != 'success' | |
| run: exit 1 | |
| axe-tests: | |
| runs-on: ubuntu-latest | |
| needs: [ build, defineChangedComponents ] | |
| if: ${{ needs.defineChangedComponents.outputs.changedComponents != '' }} | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.48.2-jammy | |
| options: --ipc=host # Needed for Chromium sandboxing | |
| steps: | |
| - name: Install Git | |
| run: apt-get update && apt-get install -y git | |
| - uses: actions/[email protected] | |
| with: | |
| token: ${{ secrets.BOT_ACCOUNT_GITHUB_TOKEN }} | |
| fetch-depth: 0 | |
| - name: Mark workspace as safe | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - uses: pnpm/[email protected] | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: | | |
| echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| enableCrossOsArchive: true | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Install Browser | |
| run: npx playwright install --with-deps | |
| - name: Restore cached build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| with: | |
| path: | | |
| semcore/*/lib | |
| tools/*/lib | |
| semcore/icon/**/*.js | |
| semcore/icon/**/*.mjs | |
| semcore/icon/**/*.d.ts | |
| semcore/illustration/**/*.js | |
| semcore/illustration/**/*.mjs | |
| semcore/illustration/**/*.d.ts | |
| key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| enableCrossOsArchive: true | |
| - name: Build basic packages | |
| if: steps.cache-build.outputs.cache-hit != 'true' | |
| run: | | |
| pnpm --filter @semcore/core build | |
| pnpm --filter @semcore/base-components build | |
| pnpm build:icons | |
| pnpm build:illustration | |
| - name: Axe testing | |
| id: axe-testing | |
| env: | |
| CHANGED_COMPONENTS: ${{ needs.defineChangedComponents.outputs.changedComponents }} | |
| run: HOME=/root pnpm playwright test --config playwright.axe.config.ts $CHANGED_COMPONENTS | |
| continue-on-error: true | |
| - name: Save test results as artifacts | |
| if: steps.axe-testing.outcome != 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: axe-testing-failure-output | |
| path: test-results | |
| retention-days: 3 | |
| - name: Fail if test step actually failed | |
| if: steps.axe-testing.outcome != 'success' | |
| run: exit 1 | |
| nvda-tests: | |
| runs-on: windows-latest | |
| needs: [ build, defineChangedComponents ] | |
| if: ${{ needs.defineChangedComponents.outputs.changedComponents != '' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/[email protected] | |
| - name: Install Node.js | |
| uses: actions/[email protected] | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/[email protected] | |
| name: Install pnpm | |
| id: pnpm-install | |
| with: | |
| version: 10.11.1 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| shell: pwsh | |
| run: | | |
| $pnpmStorePath = pnpm store path | |
| echo "pnpm_cache_dir=$pnpmStorePath" >> $env:GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| name: Setup pnpm cache | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| key: pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| enableCrossOsArchive: true | |
| - name: Restore cached build | |
| uses: actions/cache@v4 | |
| id: cache-build | |
| with: | |
| path: | | |
| semcore/*/lib | |
| tools/*/lib | |
| semcore/icon/**/*.js | |
| semcore/icon/**/*.mjs | |
| semcore/icon/**/*.d.ts | |
| semcore/illustration/**/*.js | |
| semcore/illustration/**/*.mjs | |
| semcore/illustration/**/*.d.ts | |
| key: build-${{ hashFiles('**/pnpm-lock.yaml', '**/CHANGELOG.md') }}-5 | |
| enableCrossOsArchive: true | |
| - name: Install dependencies | |
| run: | | |
| pnpm install --frozen-lockfile --ignore-scripts | |
| - name: Install Playwright Browsers | |
| run: npx playwright install | |
| - name: NVDA setup | |
| run: pnpm nvda-test:setup | |
| - name: NVDA testing | |
| id: nvda-testing | |
| env: | |
| CHANGED_COMPONENTS: ${{ needs.defineChangedComponents.outputs.changedComponents }} | |
| shell: pwsh | |
| run: | | |
| $components = $env:CHANGED_COMPONENTS -split '\s+' | Where-Object { $_ } | |
| if (-not $components -or $components.Count -eq 0) { | |
| Write-Host "No changed components; skipping." | |
| exit 0 | |
| } | |
| pnpm --filter @semcore/core build | |
| pnpm --filter @semcore/icon build | |
| pnpm exec playwright test --config playwright.nvda.config.ts -- $components | |
| continue-on-error: true | |
| - name: Save test results as artifacts | |
| if: steps.nvda-testing.outcome != 'success' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nvda-testing-failure-output | |
| path: test-results | |
| retention-days: 3 | |
| - name: Fail if test step actually failed | |
| if: steps.nvda-testing.outcome != 'success' | |
| run: exit 1 |