dl working #21925
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/app' }} | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: "buildwithfern" | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }} | |
| WORKOS_CLIENT_ID: ${{ secrets.WORKOS_CLIENT_ID }} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 # This helps turbo resolve changes faster | |
| - name: Install | |
| uses: ./.github/actions/install | |
| - name: Compile and build | |
| run: pnpm turbo compile codegen build | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=8192 | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| WORKOS_API_KEY: ${{ secrets.WORKOS_API_KEY }} | |
| WORKOS_CLIENT_ID: ${{ secrets.WORKOS_CLIENT_ID }} | |
| - name: Compile Template Resolver | |
| run: pnpm --filter=@fern-api/template-resolver compile:cjs | |
| - name: Check dependencies | |
| run: pnpm depcheck | |
| - name: Check dependency deduplication | |
| run: pnpm dedupe --check | |
| - name: Format YAML | |
| run: pnpm format:yaml:check | |
| lint: | |
| runs-on: CLI | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 # This helps turbo resolve changes faster | |
| - name: Install | |
| uses: ./.github/actions/install | |
| - name: Lint style | |
| run: pnpm lint:style | |
| - name: biome | |
| run: pnpm check | |
| lint-fai: | |
| runs-on: CLI | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install | |
| uses: ./.github/actions/install | |
| - name: Setup poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
| cd servers/fai | |
| poetry install | |
| - name: Lint & Format | |
| run: | | |
| cd servers/fai | |
| make code-cleanup | |
| - name: Type check | |
| run: | | |
| cd servers/fai | |
| poetry run mypy . | |
| lint-fai-discord: | |
| runs-on: CLI | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install | |
| uses: ./.github/actions/install | |
| - name: Setup poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
| cd servers/fai-discord | |
| poetry install | |
| - name: Lint & Format | |
| run: | | |
| cd servers/fai-discord | |
| make code-cleanup | |
| - name: Type check | |
| run: | | |
| cd servers/fai-discord | |
| poetry run mypy . | |
| lint-fai-lambda: | |
| runs-on: CLI | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Install | |
| uses: ./.github/actions/install | |
| - name: Setup poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
| cd servers/fai-lambda | |
| poetry install | |
| - name: Lint & Format | |
| run: | | |
| cd servers/fai-lambda | |
| make code-cleanup | |
| - name: Type check | |
| run: | | |
| cd servers/fai-lambda | |
| poetry run mypy . | |
| test-fai: | |
| runs-on: ubuntu-latest | |
| environment: Fern Dev | |
| env: | |
| FERN_TOKEN: ${{ secrets.FERN_TOKEN }} | |
| TURBOPUFFER_API_KEY: ${{ secrets.TURBOPUFFER_API_KEY }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }} | |
| POSTGRES_DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/mydatabase | |
| ASK_FERN_SLACK_BOT_TOKEN: ${{ secrets.ASK_FERN_SLACK_BOT_TOKEN }} | |
| KV_REST_API_TOKEN: ${{ secrets.KV_REST_API_TOKEN }} | |
| KV_REST_API_READ_ONLY_TOKEN: ${{ secrets.KV_REST_API_READ_ONLY_TOKEN }} | |
| KV_REST_API_URL: ${{ secrets.KV_REST_API_URL }} | |
| FAI_LAMBDA_FUNCTION_NAME: ${{ secrets.FAI_LAMBDA_FUNCTION_NAME }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Setup poetry | |
| run: | | |
| curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 | |
| cd servers/fai | |
| poetry install | |
| - name: Create .env file | |
| run: | | |
| cd servers/fai | |
| echo "TURBOPUFFER_API_KEY=${{ env.TURBOPUFFER_API_KEY }}" >> .env | |
| echo "ANTHROPIC_API_KEY=${{ env.ANTHROPIC_API_KEY }}" >> .env | |
| echo "OPENAI_API_KEY=${{ env.OPENAI_API_KEY }}" >> .env | |
| echo "COHERE_API_KEY=${{ env.COHERE_API_KEY }}" >> .env | |
| echo "POSTGRES_DATABASE_URL=${{ env.POSTGRES_DATABASE_URL }}" >> .env | |
| echo "FERN_TOKEN=${{ env.FERN_TOKEN }}" >> .env | |
| echo "ASK_FERN_SLACK_BOT_TOKEN=${{ env.ASK_FERN_SLACK_BOT_TOKEN }}" >> .env | |
| echo "FAI_LAMBDA_FUNCTION_NAME=${{ env.FAI_LAMBDA_FUNCTION_NAME }}" >> .env | |
| echo "DISCORD_BOT_TOKEN=${{ env.DISCORD_BOT_TOKEN }}" >> .env | |
| echo "DISCORD_OAUTH_URL=${{ env.DISCORD_OAUTH_URL }}" >> .env | |
| echo "SLACK_CLIENT_ID=${{ env.SLACK_CLIENT_ID }}" >> .env | |
| echo "SLACK_CLIENT_SECRET=${{ env.SLACK_CLIENT_SECRET }}" >> .env | |
| echo "SLACK_SIGNING_SECRET=${{ env.SLACK_SIGNING_SECRET }}" >> .env | |
| - name: test | |
| run: | | |
| cd servers/fai | |
| export PYTHONPATH=$PYTHONPATH:$(pwd) | |
| poetry run pytest -sv | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 # This helps turbo resolve changes faster | |
| - name: Install | |
| uses: ./.github/actions/install | |
| - name: 🧪 Build generator-cli | |
| run: pnpm turbo --filter=@fern-api/generator-cli compile | |
| - name: Run tests | |
| run: pnpm test | |
| env: | |
| CI: true | |
| - name: Install Docker Compose | |
| run: | | |
| sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| sudo chmod +x /usr/local/bin/docker-compose | |
| docker-compose --version | |
| - name: Run tests against local FDR | |
| run: pnpm --filter=@fern-platform/fdr test:local | |
| env: | |
| CI: true |