feat: add A/B testing support with React hooks #1492
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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Unit tests | |
| run: pnpm test:coverage | |
| - name: Send test coverage to codecov | |
| continue-on-error: true | |
| uses: codecov/codecov-action@v4 | |
| - name: Build | |
| run: pnpm build | |
| - name: Archive build | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lib | |
| path: lib | |
| release: | |
| needs: [build] | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - name: Download lib from build job | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: lib | |
| path: lib | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Release | |
| run: pnpm release |