Skip to content

chore: release main #761

chore: release main

chore: release main #761

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
# Graphite CI optimizer gate. On PRs, asks the Graphite API whether this
# PR's position in its stack means CI can be skipped (e.g., it's a mid-stack
# PR that will be retested when the top of the stack runs). On pushes to
# main, the optimizer is bypassed so post-merge CI always runs.
# Docs: https://graphite.com/docs/stacking-and-ci
optimize_ci:
name: Optimize CI
runs-on: ubuntu-latest
timeout-minutes: 2
outputs:
skip: ${{ steps.graphite.outputs.skip || steps.bypass.outputs.skip }}
steps:
- name: Bypass optimizer on push events
id: bypass
if: github.event_name != 'pull_request'
run: echo "skip=false" >> "$GITHUB_OUTPUT"
- name: Verify Graphite token is configured
if: github.event_name == 'pull_request'
env:
TOKEN: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
run: |
if [ -z "$TOKEN" ]; then
echo "::error::GRAPHITE_CI_OPTIMIZER_TOKEN secret is not set. Add it under Settings → Secrets and variables → Actions, or remove the optimize_ci job."
exit 1
fi
- name: Graphite CI optimizer
id: graphite
if: github.event_name == 'pull_request'
uses: withgraphite/graphite-ci-action@9bc969adfd43bb790da3b64b543c78c75cef9689 # v0.0.9
with:
graphite_token: ${{ secrets.GRAPHITE_CI_OPTIMIZER_TOKEN }}
lint:
name: Lint
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: '.nvmrc'
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: 'package.json'
# ESLint 캐시 복원
- name: Restore ESLint cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
.eslintcache
apps/*/.eslintcache
packages/*/.eslintcache
key: ${{ runner.os }}-eslint-${{ hashFiles('**/package.json', '**/.eslintrc*', '**/eslint.config.*') }}
restore-keys: |
${{ runner.os }}-eslint-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run lint
run: bun run lint
build:
name: Build
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: '.nvmrc'
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: 'package.json'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build all packages
run: bun run build
typecheck:
name: Type Check
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: '.nvmrc'
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: 'package.json'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run type check
run: bun run check-types || echo "Type check not configured yet"
test:
name: Test
needs: optimize_ci
if: needs.optimize_ci.outputs.skip == 'false'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22'
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: 'package.json'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build packages
run: bun run build
- name: Run tests
run: bun run test:projects