Roo-Code/.github/workflows/CI.yml
2025-05-14 22:14:00 -07:00

104 lines
2.3 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
NODE_VERSION: 20.18.1
PNPM_VERSION: 10.8.1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build Next.js
run: pnpm build
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install dependencies
run: pnpm install
# - name: Build Next.js for E2E tests
# run: pnpm build
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Run linter
run: pnpm lint
- name: Run type checker
run: pnpm check-types
- name: Run unit tests
run: pnpm test # -- --coverage
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v4
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# - name: Install Playwright (used for Storybook and E2E tests)
# run: npx playwright install --with-deps
# - name: Run storybook tests
# run: pnpm test-storybook:ci
# - name: Run E2E tests
# run: npx percy exec -- npm run test:e2e
# env:
# PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
# CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: test-results
# path: test-results/
# retention-days: 7
check:
needs: [build, test]
runs-on: ubuntu-latest
steps:
- name: NO-OP
run: echo "All checks passed."