Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
ci: parallelize Coverage into 4 shards + merge job
diegosouzapwebe0b6607cb6
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex f1cc3baa64..375a946574 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -211,7 +211,7 @@ jobs:cache: npm- run: npm ci- run: npm run check:node-runtime- - run: node --import tsx --test --test-force-exit --test-concurrency=1 --test-shard=${{ matrix.shard }}/4 tests/unit/*.test.ts+ - run: node --import tsx --test --test-force-exit --test-concurrency=4 --test-shard=${{ matrix.shard }}/4 tests/unit/*.test.tsnode-24-compat:name: Node 24 Compatibility (${{ matrix.shard }}/2)@@ -235,7 +235,7 @@ jobs:- run: npm ci- run: npm run check:node-runtime- run: npm run build- - run: node --import tsx --test --test-force-exit --test-concurrency=1 --test-shard=${{ matrix.shard }}/2 tests/unit/*.test.ts+ - run: node --import tsx --test --test-force-exit --test-concurrency=4 --test-shard=${{ matrix.shard }}/2 tests/unit/*.test.tsnode-26-compat:name: Node 26 Compatibility (${{ matrix.shard }}/2)@@ -259,13 +259,17 @@ jobs:- run: npm ci- run: npm run check:node-runtime- run: npm run build- - run: node --import tsx --test --test-force-exit --test-concurrency=1 --test-shard=${{ matrix.shard }}/2 tests/unit/*.test.ts+ - run: node --import tsx --test --test-force-exit --test-concurrency=4 --test-shard=${{ matrix.shard }}/2 tests/unit/*.test.ts- test-coverage:- name: Coverage+ test-coverage-shard:+ name: Coverage Shard (${{ matrix.shard }}/4)runs-on: ubuntu-latest- timeout-minutes: 60+ timeout-minutes: 25needs: build+ strategy:+ fail-fast: false+ matrix:+ shard: [1, 2, 3, 4]env:JWT_SECRET: ci-test-secret-with-sufficient-length-for-validationAPI_KEY_SECRET: ci-test-api-key-secret-long@@ -278,8 +282,59 @@ jobs:cache: npm- run: npm ci- run: npm run check:node-runtime- - name: Run coverage gate- run: npm run test:coverage+ - name: Run c8 over shard ${{ matrix.shard }}/4+ run: |+ npx c8 \+ --reporter=json \+ --output-dir=coverage-shard \+ --exclude=tests/** \+ --exclude=**/*.test.* \+ node --import tsx --test --test-force-exit --test-concurrency=4 \+ --test-shard=${{ matrix.shard }}/4 tests/unit/*.test.ts+ - name: Upload raw shard coverage+ if: always()+ uses: actions/upload-artifact@v7+ with:+ name: coverage-shard-${{ matrix.shard }}+ path: coverage-shard/+ if-no-files-found: warn++ test-coverage:+ name: Coverage+ runs-on: ubuntu-latest+ timeout-minutes: 10+ needs: test-coverage-shard+ if: ${{ always() && needs.test-coverage-shard.result == 'success' }}+ env:+ JWT_SECRET: ci-test-secret-with-sufficient-length-for-validation+ API_KEY_SECRET: ci-test-api-key-secret-long+ steps:+ - uses: actions/checkout@v6+ - uses: actions/setup-node@v6+ with:+ node-version: ${{ env.CI_NODE_VERSION }}+ cache: npm+ - run: npm ci+ - name: Download all shard coverage+ uses: actions/download-artifact@v7+ with:+ pattern: coverage-shard-*+ path: coverage-shards/+ merge-multiple: true+ - name: Merge + report + gate+ run: |+ mkdir -p coverage+ npx c8 report \+ --temp-directory coverage-shards \+ --reports-dir coverage \+ --reporter=text-summary \+ --reporter=html \+ --reporter=json-summary \+ --reporter=lcov \+ --exclude=tests/** \+ --exclude=**/*.test.* \+ --check-coverage \+ --statements 75 --lines 75 --functions 75 --branches 70- name: Build coverage summaryif: always()run: |