mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
name: CI - Type Check, Format & Lint
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
quality-checks:
|
|
name: Quality Checks
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.3.6
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Detect SDK package changes
|
|
id: sdk-changes
|
|
run: |
|
|
if git diff --quiet "${{ github.event.pull_request.base.sha }}" HEAD -- packages/tools; then
|
|
echo "tools=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "tools=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
if git diff --quiet "${{ github.event.pull_request.base.sha }}" HEAD -- packages/ai-sdk; then
|
|
echo "ai_sdk=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "ai_sdk=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Run Tools unit tests
|
|
if: steps.sdk-changes.outputs.tools == 'true'
|
|
run: bun run --cwd packages/tools test:unit
|
|
|
|
- name: Build Tools package
|
|
if: steps.sdk-changes.outputs.tools == 'true' || steps.sdk-changes.outputs.ai_sdk == 'true'
|
|
run: bun run --cwd packages/tools build
|
|
|
|
- name: Run AI SDK type checking
|
|
if: steps.sdk-changes.outputs.tools == 'true' || steps.sdk-changes.outputs.ai_sdk == 'true'
|
|
run: bun run --cwd packages/ai-sdk check-types
|
|
|
|
- name: Run AI SDK unit tests
|
|
if: steps.sdk-changes.outputs.ai_sdk == 'true'
|
|
run: bun run --cwd packages/ai-sdk test:unit
|
|
|
|
- name: Build AI SDK package
|
|
if: steps.sdk-changes.outputs.ai_sdk == 'true'
|
|
run: bun run --cwd packages/ai-sdk build
|
|
|
|
- name: Run Memory Graph type checking
|
|
run: bun run --cwd packages/memory-graph check-types
|
|
|
|
- name: Run Memory Graph unit tests
|
|
run: bun run --cwd packages/memory-graph test
|
|
|
|
- name: Run Biome CI (format & lint on changed files)
|
|
run: bunx biome ci --changed --since=origin/main --no-errors-on-unmatched
|