chore: some package cleanup #99
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 | |
| - pull_request | |
| - workflow_call | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Typecheck | |
| run: pnpm run typecheck | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [22.x, 24.x] | |
| services: | |
| loki: | |
| image: grafana/loki:latest | |
| ports: | |
| - 3100:3100 | |
| env: | |
| LOKI_HOST: http://localhost:3100 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set node version to ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| - name: Install | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build | |
| - name: Wait for Loki to be ready | |
| run: | | |
| for i in {1..30}; do | |
| if curl -s http://localhost:3100/ready | grep -q "ready"; then | |
| echo "Loki is ready" | |
| exit 0 | |
| fi | |
| echo "Waiting for Loki... ($i/30)" | |
| sleep 2 | |
| done | |
| echo "Loki failed to start" | |
| exit 1 | |
| - name: Test | |
| run: pnpm test |