mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 21:05:51 +00:00
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "feature/*", "feat/*"]
|
|
pull_request:
|
|
branches: [main, "feat/*"]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, 2026-04-25
|
|
env:
|
|
GIT_CONFIG_COUNT: 2
|
|
GIT_CONFIG_KEY_0: init.defaultBranch
|
|
GIT_CONFIG_VALUE_0: main
|
|
GIT_CONFIG_KEY_1: advice.defaultBranchName
|
|
GIT_CONFIG_VALUE_1: "false"
|
|
|
|
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2, 2026-04-25
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Install dependencies
|
|
env:
|
|
CLAUDE_CODE_SKIP_CHROME_MCP_SETUP: "1"
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Lint and format check
|
|
run: bunx biome ci .
|
|
|
|
- name: Type check
|
|
run: bun run typecheck
|
|
|
|
- name: Test with Coverage
|
|
run: |
|
|
# Tolerate pre-existing flaky tests (Bun mock pollution / order-dependent state).
|
|
# We still require lcov.info to be generated and contain real coverage data.
|
|
bun test --coverage --coverage-reporter lcov --coverage-dir coverage 2>&1 | grep -vE '^\s*(\(pass\)|\(skip\))' | sed '/^.*\/__tests__\/.*:$/d' | cat -s || true
|
|
test -s coverage/lcov.info
|
|
grep -q '^SF:' coverage/lcov.info
|
|
|
|
- name: Upload coverage to Codecov
|
|
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
|
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5, 2026-04-25
|
|
with:
|
|
fail_ci_if_error: true
|
|
files: ./coverage/lcov.info
|
|
disable_search: true
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
- name: Build
|
|
run: bun run build:vite
|