fix: drop metrics for unmatched routes to prevent cardinality explosion #360
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: ./packages/chronicle | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.9 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: . | |
| - name: Lint | |
| run: bun run lint | |
| - name: Test | |
| run: bun test | |
| smoke-test: | |
| name: Smoke Test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.9 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build CLI | |
| run: bun run build:cli | |
| working-directory: ./packages/chronicle | |
| - name: Build example | |
| run: ./packages/chronicle/bin/chronicle.js build --config examples/basic/chronicle.yaml | |
| shell: bash | |
| - name: Smoke test dev server | |
| shell: bash | |
| env: | |
| NITRO_DEV_RUNNER: ${{ matrix.os == 'windows-latest' && 'self' || '' }} | |
| run: | | |
| ./packages/chronicle/bin/chronicle.js dev --config examples/basic/chronicle.yaml --port 3001 & | |
| DEV_PID=$! | |
| for i in $(seq 1 30); do | |
| if curl -sf http://localhost:3001/api/health > /dev/null 2>&1; then | |
| echo "Dev server ready" | |
| break | |
| fi | |
| sleep 2 | |
| done | |
| curl -sf http://localhost:3001/api/health | grep -q '"ok"' | |
| echo "Dev server health check passed" | |
| kill $DEV_PID 2>/dev/null || true | |
| - name: Smoke test start server | |
| shell: bash | |
| run: | | |
| ./packages/chronicle/bin/chronicle.js start --config examples/basic/chronicle.yaml --port 3002 & | |
| START_PID=$! | |
| for i in $(seq 1 30); do | |
| if curl -sf http://localhost:3002/api/health > /dev/null 2>&1; then | |
| echo "Start server ready" | |
| break | |
| fi | |
| sleep 2 | |
| done | |
| curl -sf http://localhost:3002/api/health | grep -q '"ok"' | |
| echo "Start server health check passed" | |
| kill $START_PID 2>/dev/null || true |