Sync Codex review workflow to latest #1049
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| python-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff mypy | |
| if [ -f examples/python/requirements.txt ]; then pip install -r examples/python/requirements.txt; fi | |
| - name: Lint with ruff | |
| run: ruff check . --extend-exclude '**/*.ipynb' | |
| - name: Type check with mypy | |
| run: mypy examples/python apps/pipecat-moss apps/livekit-moss-vercel --ignore-missing-imports --exclude "apps/pipecat-moss/hume-ollama-local/create_index.py" | |
| javascript-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: | | |
| package-lock.json | |
| examples/javascript/package-lock.json | |
| apps/next-js/package-lock.json | |
| - name: Install root dependencies | |
| run: npm ci | |
| - name: Install examples/javascript dependencies | |
| working-directory: examples/javascript | |
| run: npm ci | |
| - name: Install apps/next-js dependencies | |
| working-directory: apps/next-js | |
| run: npm ci | |
| - name: Lint (examples/javascript + apps/next-js) | |
| run: npm run lint | |
| - name: Type check (examples/javascript + apps/next-js) | |
| run: npm run type-check | |
| cookbook-langchain-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install package | |
| working-directory: examples/cookbook/langchain | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e . | |
| pip install pytest | |
| - name: Run tests | |
| working-directory: examples/cookbook/langchain | |
| run: pytest -v | |
| python-sdk-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install SDK with dev dependencies | |
| working-directory: sdks/python/sdk | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Lint with ruff | |
| working-directory: sdks/python/sdk | |
| run: | | |
| pip install ruff | |
| ruff check src/ tests/ | |
| - name: Type check with mypy | |
| working-directory: sdks/python/sdk | |
| run: mypy src/ --ignore-missing-imports | |
| - name: Run tests | |
| working-directory: sdks/python/sdk | |
| run: pytest tests/ -v | |
| next-js-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: apps/next-js/package-lock.json | |
| - name: Install dependencies | |
| working-directory: apps/next-js | |
| run: npm ci | |
| - name: Build | |
| working-directory: apps/next-js | |
| env: | |
| NEXT_PUBLIC_MOSS_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_MOSS_PROJECT_ID }} | |
| NEXT_PUBLIC_MOSS_PROJECT_KEY: ${{ secrets.NEXT_PUBLIC_MOSS_PROJECT_KEY }} | |
| run: npm run build | |
| - name: Run tests | |
| working-directory: apps/next-js | |
| run: npm test | |
| vercel-sdk-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - node-version: '20' | |
| ai-version: '^6.0.0' | |
| - node-version: '22' | |
| ai-version: '7.0.8' | |
| name: vercel-sdk-test (ai@${{ matrix.ai-version }}, node@${{ matrix.node-version }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: packages/vercel-sdk/package-lock.json | |
| - name: Install dependencies | |
| working-directory: packages/vercel-sdk | |
| run: npm ci | |
| - name: Override ai version | |
| working-directory: packages/vercel-sdk | |
| run: npm install --no-save ai@${{ matrix.ai-version }} | |
| - name: Build | |
| working-directory: packages/vercel-sdk | |
| run: npm run build | |
| - name: Run tests | |
| working-directory: packages/vercel-sdk | |
| run: npm test | |
| vitepress-plugin-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| working-directory: packages/vitepress-plugin-moss | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| working-directory: packages/vitepress-plugin-moss | |
| run: pnpm build | |
| - name: Run tests | |
| working-directory: packages/vitepress-plugin-moss | |
| run: pnpm test |