feat: button toggle group #10814
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: "Storybook Tests" | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - "main" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Detect which projects have changed | |
| detect-changes: | |
| uses: ./.github/workflows/_check-workspaces-changes.yaml | |
| test: | |
| needs: detect-changes | |
| name: "[⚛️ REACT] Storybook Tests" | |
| if: | | |
| needs.detect-changes.outputs.package_react == 'true' && | |
| github.head_ref != 'release-please--branches--master' && | |
| !contains(github.event.pull_request.labels.*.name, 'autorelease') | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - name: Install Playwright | |
| run: | | |
| PLAYWRIGHT_VERSION=$(pnpm why @playwright/test -r --json | jq -r '.[] | select(.devDependencies["@playwright/test"]) | .devDependencies["@playwright/test"].version') | |
| echo "PLAYWRIGHT_VERSION: $PLAYWRIGHT_VERSION" | |
| pnpx playwright@$PLAYWRIGHT_VERSION install --with-deps | |
| - name: Build Storybook | |
| run: | | |
| pnpm --filter @factorialco/f0-core build | |
| pnpm --filter @factorialco/f0-react run build-storybook --quiet | |
| - name: Serve Storybook and run tests | |
| run: | | |
| pnpx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | |
| "pnpx http-server packages/react/storybook-static --port 6006 --silent" \ | |
| "pnpx wait-on tcp:6006 && pnpm --filter @factorialco/f0-react test-storybook" |