fix badge #21
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: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| NODE_VERSION: '22.x' | |
| jobs: | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Cache TypeScript build info | |
| uses: actions/cache@v4 | |
| with: | |
| path: packages/react-contextual-analytics/.tsbuildinfo | |
| key: ${{ github.runner.os }}-ts-${{ hashFiles('packages/react-contextual-analytics/tsconfig.json') }} | |
| restore-keys: | | |
| ${{ github.runner.os }}-ts- | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Type check | |
| run: pnpm typecheck | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run tests with coverage | |
| run: pnpm test:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./packages/react-contextual-analytics/coverage/lcov.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./packages/react-contextual-analytics/coverage/ | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Cache TypeScript build info | |
| uses: actions/cache@v4 | |
| with: | |
| path: packages/react-contextual-analytics/.tsbuildinfo | |
| key: ${{ github.runner.os }}-ts-${{ hashFiles('packages/react-contextual-analytics/tsconfig.json') }} | |
| restore-keys: | | |
| ${{ github.runner.os }}-ts- | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build package | |
| run: pnpm build |