feat(filter-input): add disabled chip support [AS-801] #447
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: ['**'] | |
| workflow_dispatch: | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| contents: write | |
| packages: write | |
| pull-requests: write | |
| checks: write | |
| id-token: write | |
| issues: write | |
| env: | |
| HUSKY: "0" | |
| NODE_VERSION: "24" | |
| PNPM_VERSION: "10.29.3" | |
| PLAYWRIGHT_VERSION: "1.58.0" | |
| SCREENSHOT_COMMIT_MESSAGE: "🖼️ Update screenshots" | |
| jobs: | |
| # ======================================== | |
| # Setup & Check Triggers | |
| # ======================================== | |
| setup: | |
| name: Setup & Check Triggers | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should-update-screenshots: ${{ steps.check-screenshots.outputs.should_update }} | |
| should-skip-e2e: ${{ steps.check-e2e-skip.outputs.should_skip }} | |
| should-release-mcp: ${{ steps.check-mcp.outputs.should_release }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check screenshot update trigger | |
| id: check-screenshots | |
| env: | |
| COMMIT_MSG_PUSH: ${{ github.event.head_commit.message }} | |
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| EVENT_NAME: ${{ github.event_name }} | |
| run: | | |
| if [[ "$EVENT_NAME" == "pull_request" ]]; then | |
| COMMIT_MSG=$(git log "$PR_HEAD_SHA" -1 --pretty=%B) | |
| else | |
| COMMIT_MSG="$COMMIT_MSG_PUSH" | |
| fi | |
| if [[ "$COMMIT_MSG" == *"[update-screenshots]"* ]]; then | |
| echo "should_update=true" >> $GITHUB_OUTPUT | |
| echo "✅ [update-screenshots] trigger found" | |
| else | |
| echo "should_update=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Check E2E skip trigger | |
| id: check-e2e-skip | |
| env: | |
| COMMIT_MSG_PUSH: ${{ github.event.head_commit.message }} | |
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| EVENT_NAME: ${{ github.event_name }} | |
| run: | | |
| if [[ "$EVENT_NAME" == "pull_request" ]]; then | |
| COMMIT_MSG=$(git log "$PR_HEAD_SHA" -1 --pretty=%B) | |
| else | |
| COMMIT_MSG="$COMMIT_MSG_PUSH" | |
| fi | |
| if [[ "$COMMIT_MSG" == *"[skip-e2e]"* ]]; then | |
| echo "should_skip=true" >> $GITHUB_OUTPUT | |
| echo "✅ [skip-e2e] trigger found - will skip E2E tests" | |
| else | |
| echo "should_skip=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Check MCP release trigger | |
| id: check-mcp | |
| run: | | |
| SHOULD_RELEASE="false" | |
| # Compare against the merge base with main to detect ALL branch changes | |
| MERGE_BASE=$(git merge-base origin/main HEAD 2>/dev/null || echo "") | |
| if [ -n "$MERGE_BASE" ] && [ "$MERGE_BASE" != "$(git rev-parse HEAD)" ]; then | |
| RANGE="${MERGE_BASE}..HEAD" | |
| else | |
| # On main branch, compare with previous commit | |
| RANGE="HEAD~1..HEAD" | |
| fi | |
| echo "Checking range: $RANGE" | |
| # Detect breaking changes (feat!:, fix!:, BREAKING CHANGE in body) | |
| if git log "$RANGE" --pretty="%B" | grep -qE "^(feat|fix|refactor|perf)(\(.+\))?!:|BREAKING CHANGE"; then | |
| echo "🔥 Breaking change detected — MCP release triggered" | |
| SHOULD_RELEASE="true" | |
| fi | |
| # Detect changes in mcp-core or mcp packages | |
| CHANGED_FILES=$(git diff --name-only "$RANGE") | |
| if echo "$CHANGED_FILES" | grep -qE "^packages/(mcp-core|mcp)/"; then | |
| echo "📦 MCP package changes detected — MCP release triggered" | |
| SHOULD_RELEASE="true" | |
| fi | |
| echo "should_release=$SHOULD_RELEASE" >> $GITHUB_OUTPUT | |
| # ======================================== | |
| # Quality Checks (Parallel) | |
| # ======================================== | |
| quality: | |
| name: Quality Check - ${{ matrix.check }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| check: [lint, typecheck, test] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| packages/*/node_modules | |
| packages/configs/*/node_modules | |
| key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| node-modules-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run ${{ matrix.check }} | |
| run: | | |
| if [ "${{ matrix.check }}" = "test" ]; then | |
| pnpm test:run -- --reporter=default --reporter=junit --outputFile=./test-results/junit.xml | |
| else | |
| pnpm ${{ matrix.check }} | |
| fi | |
| - name: Upload unit test results | |
| if: always() && matrix.check == 'test' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unit-test-results | |
| path: | | |
| packages/*/test-results/junit.xml | |
| if-no-files-found: ignore | |
| # ======================================== | |
| # Build | |
| # ======================================== | |
| build: | |
| name: Build Packages | |
| runs-on: ubuntu-latest | |
| needs: [setup, quality] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| packages/*/node_modules | |
| packages/configs/*/node_modules | |
| key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| node-modules-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build all packages | |
| run: pnpm build | |
| - name: Build Storybook | |
| run: pnpm --filter=@wallarm-org/design-system build-storybook | |
| - name: Upload Storybook artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: storybook-static | |
| path: packages/design-system/storybook-static | |
| retention-days: 7 | |
| - name: Upload built packages artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: built-packages | |
| path: | | |
| packages/*/dist | |
| packages/configs/*/dist | |
| retention-days: 1 | |
| # ======================================== | |
| # E2E Tests | |
| # ======================================== | |
| e2e: | |
| name: E2E Tests (shard ${{ matrix.shard }}) | |
| runs-on: ubuntu-latest | |
| needs: [setup, build] | |
| if: | | |
| needs.setup.outputs.should-update-screenshots != 'true' && | |
| needs.setup.outputs.should-skip-e2e != 'true' | |
| strategy: | |
| matrix: | |
| shard: [1, 2, 3] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| packages/*/node_modules | |
| packages/configs/*/node_modules | |
| key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| node-modules-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build config packages | |
| run: pnpm --filter="./packages/configs/*" build | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install Playwright browsers | |
| run: pnpm exec playwright install --with-deps chromium | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| - name: Install Playwright system deps | |
| run: pnpm exec playwright install-deps chromium | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| - name: Download Storybook artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: storybook-static | |
| path: packages/design-system/storybook-static | |
| - name: Serve Storybook & Run E2E tests | |
| run: | | |
| # Set up directory structure for serving with /design-system/ base path | |
| mkdir -p storybook-serve/design-system | |
| cp -r packages/design-system/storybook-static/* storybook-serve/design-system/ | |
| # Start HTTP server for Storybook | |
| npx http-server storybook-serve -p 6006 & | |
| # Wait for server to be ready | |
| timeout 30 bash -c 'until curl -f http://localhost:6006/design-system/iframe.html; do sleep 1; done' | |
| # Run E2E tests | |
| cd packages/design-system | |
| pnpm exec playwright test --shard=${{ matrix.shard }}/3 --project=chromium | |
| env: | |
| CI: true | |
| STORYBOOK_URL: http://localhost:6006/design-system | |
| - name: Upload E2E test results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: e2e-results-shard-${{ matrix.shard }} | |
| path: | | |
| packages/design-system/test-results/ | |
| packages/design-system/playwright-report/ | |
| if-no-files-found: ignore | |
| # ======================================== | |
| # Report Unit Test Results | |
| # ======================================== | |
| unit-test-report: | |
| name: Report Unit Test Results | |
| runs-on: ubuntu-latest | |
| needs: [quality] | |
| if: always() && needs.quality.result != 'skipped' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download unit test artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: unit-test-results | |
| path: unit-test-artifacts | |
| - name: Publish unit test results | |
| uses: dorny/test-reporter@v1 | |
| with: | |
| name: Unit Test Results | |
| path: "unit-test-artifacts/**/junit.xml" | |
| reporter: java-junit | |
| fail-on-error: false | |
| # ======================================== | |
| # Report E2E Test Results | |
| # ======================================== | |
| e2e-report: | |
| name: Report E2E Results | |
| runs-on: ubuntu-latest | |
| needs: [e2e] | |
| if: always() && needs.e2e.result != 'skipped' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all E2E artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: e2e-results-* | |
| path: e2e-artifacts | |
| merge-multiple: false | |
| - name: Publish E2E test results | |
| uses: dorny/test-reporter@v1 | |
| with: | |
| name: E2E Test Results | |
| path: "e2e-artifacts/**/junit.xml" | |
| reporter: java-junit | |
| fail-on-error: false | |
| # ======================================== | |
| # E2E Update Screenshots | |
| # ======================================== | |
| e2e-update-screenshots: | |
| name: Update Screenshots (shard ${{ matrix.shard }}) | |
| runs-on: ubuntu-latest | |
| needs: [setup, build] | |
| if: needs.setup.outputs.should-update-screenshots == 'true' | |
| strategy: | |
| matrix: | |
| shard: [1, 2, 3] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| packages/*/node_modules | |
| packages/configs/*/node_modules | |
| key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| node-modules-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build config packages | |
| run: pnpm --filter="./packages/configs/*" build | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install Playwright browsers | |
| run: pnpm exec playwright install --with-deps chromium | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| - name: Install Playwright system deps | |
| run: pnpm exec playwright install-deps chromium | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| - name: Download Storybook artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: storybook-static | |
| path: packages/design-system/storybook-static | |
| - name: Update screenshots | |
| run: | | |
| # Set up directory structure for serving with /design-system/ base path | |
| mkdir -p storybook-serve/design-system | |
| cp -r packages/design-system/storybook-static/* storybook-serve/design-system/ | |
| # Start HTTP server for Storybook | |
| npx http-server storybook-serve -p 6006 & | |
| # Wait for server to be ready | |
| timeout 30 bash -c 'until curl -f http://localhost:6006/design-system/iframe.html; do sleep 1; done' | |
| # Unset CI to allow snapshot creation | |
| unset CI | |
| # Update screenshots (exit code ignored - new snapshots cause non-zero exit) | |
| pnpm --filter=@wallarm-org/design-system exec playwright test \ | |
| --shard=${{ matrix.shard }}/3 \ | |
| --project=chromium \ | |
| --update-snapshots || true | |
| env: | |
| STORYBOOK_URL: http://localhost:6006/design-system | |
| - name: Upload updated screenshots | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: screenshots-shard-${{ matrix.shard }} | |
| path: | | |
| packages/design-system/src/**/*.png | |
| packages/design-system/tests/**/*.png | |
| retention-days: 1 | |
| # ======================================== | |
| # Commit Updated Screenshots | |
| # ======================================== | |
| commit-screenshots: | |
| name: Commit Updated Screenshots | |
| runs-on: ubuntu-latest | |
| needs: [e2e-update-screenshots] | |
| if: always() && needs.e2e-update-screenshots.result == 'success' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| fetch-depth: 0 | |
| - name: Download all screenshot artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: screenshots-shard-* | |
| merge-multiple: true | |
| path: packages/design-system | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git add . | |
| if git diff --cached --quiet; then | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| echo "No screenshot changes detected" | |
| else | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| echo "Screenshot changes detected:" | |
| git diff --cached --name-only | |
| fi | |
| - name: Commit and push screenshots | |
| if: steps.changes.outputs.has_changes == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -m "${{ env.SCREENSHOT_COMMIT_MESSAGE }}" | |
| git push | |
| # ======================================== | |
| # Deploy Storybook to GitHub Pages | |
| # ======================================== | |
| deploy-storybook: | |
| name: Deploy Storybook | |
| runs-on: ubuntu-latest | |
| needs: [setup, build, e2e] | |
| if: | | |
| always() && | |
| needs.build.result == 'success' && | |
| (needs.e2e.result == 'success' || needs.e2e.result == 'skipped') && | |
| needs.setup.outputs.should-update-screenshots != 'true' && | |
| github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Download Storybook artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: storybook-static | |
| path: ./storybook-static | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload to Pages | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./storybook-static | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| # ======================================== | |
| # Release | |
| # ======================================== | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [setup, build, e2e] | |
| if: | | |
| always() && | |
| needs.build.result == 'success' && | |
| (needs.e2e.result == 'success' || needs.e2e.result == 'skipped') && | |
| needs.setup.outputs.should-update-screenshots != 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| packages/*/node_modules | |
| packages/configs/*/node_modules | |
| key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: | | |
| node-modules-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Download built packages artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: built-packages | |
| path: packages | |
| - name: Release design-system | |
| run: pnpm semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Release mcp | |
| if: needs.setup.outputs.should-release-mcp == 'true' | |
| working-directory: packages/mcp | |
| run: pnpm semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |