From 914a5dc6ae6584a0ec7b1833630e00b3c54ca32a Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Fri, 10 Apr 2026 00:20:42 +0700 Subject: [PATCH] ci: add comprehensive CI workflow --- .github/workflows/ci.yml | 171 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..04b70c0bb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,171 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Check formatting + run: npx biome format . + + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Build highlight dependency + run: npm run build --workspace=@getpaseo/highlight + + - name: Build relay dependency + run: npm run build --workspace=@getpaseo/relay + + - name: Typecheck all packages + run: npm run typecheck + + server-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Fetch origin/main (worktree tests) + run: git fetch --no-tags origin main:refs/remotes/origin/main + + - name: Install dependencies + run: npm install + + - name: Build highlight dependency + run: npm run build --workspace=@getpaseo/highlight + + - name: Build relay dependency + run: npm run build --workspace=@getpaseo/relay + + - name: Run server tests + run: npm run test --workspace=@getpaseo/server + env: + CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + + app-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Run app unit tests + run: npm run test --workspace=@getpaseo/app + + playwright: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Install Playwright browsers + run: npx playwright install --with-deps chromium + + - name: Build highlight dependency + run: npm run build --workspace=@getpaseo/highlight + + - name: Build relay dependency + run: npm run build --workspace=@getpaseo/relay + + - name: Run Playwright E2E tests + run: npm run test:e2e --workspace=@getpaseo/app + env: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + + - name: Upload test artifacts + uses: actions/upload-artifact@v4 + if: failure() + with: + name: playwright-results + path: | + packages/app/test-results/ + packages/app/playwright-report/ + retention-days: 7 + + relay-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Build relay + run: npm run build --workspace=@getpaseo/relay + + - name: Run relay tests + run: npm run test --workspace=@getpaseo/relay + + cli-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm install + + - name: Build highlight dependency + run: npm run build --workspace=@getpaseo/highlight + + - name: Run CLI tests + run: npm run test --workspace=@getpaseo/cli + env: + PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD: '0' + PASEO_DICTATION_ENABLED: '0' + PASEO_VOICE_MODE_ENABLED: '0'