feat(api): add search, describe, and intelligent suggestions #6650
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
| # This workflow runs for every pull request to lint and test the proposed changes. | |
| name: Check | |
| on: | |
| push: | |
| branches: [master, renovate/**] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| LATEST_NODE_VERSION: 24 | |
| APIFY_CLI_DISABLE_TELEMETRY: 1 | |
| concurrency: | |
| cancel-in-progress: false | |
| group: checks-${{ github.ref }} | |
| jobs: | |
| build: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[docs build]') }} | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.LATEST_NODE_VERSION }} | |
| - name: Install pnpm and dependencies | |
| uses: apify/workflows/pnpm-install@main | |
| - name: Run TSC | |
| run: pnpm run build | |
| - name: Ensure the reference documentation builds | |
| run: pnpm run update-docs | |
| lint: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[docs build]') }} | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.LATEST_NODE_VERSION }} | |
| - name: Install pnpm and dependencies | |
| uses: apify/workflows/pnpm-install@main | |
| - name: Run lint checks | |
| run: pnpm run lint | |
| - name: Run format checks | |
| run: pnpm run format | |
| test_local: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[docs build]') }} | |
| name: Local Tests | |
| needs: [build] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-2025] | |
| node-version: [20, 22, 24] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Mask secrets | |
| run: | | |
| echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}" | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install pnpm and dependencies | |
| uses: apify/workflows/pnpm-install@main | |
| - name: Setup Python 3.12 (Windows) | |
| if: ${{ matrix.os == 'windows-2025' }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.14 | |
| - name: Run local tests | |
| run: pnpm run test:local | |
| test_api: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[docs build]') }} | |
| name: API Tests | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Mask secrets | |
| run: | | |
| echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}" | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.LATEST_NODE_VERSION }} | |
| - name: Install pnpm and dependencies | |
| uses: apify/workflows/pnpm-install@main | |
| - name: Run API tests | |
| env: | |
| TEST_USER_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }} | |
| run: pnpm run test:api | |
| test_python_support: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[docs build]') }} | |
| name: Python Support | |
| needs: [build] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-2025] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Mask secrets | |
| run: | | |
| echo "::add-mask::${{ secrets.APIFY_TEST_USER_API_TOKEN }}" | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.LATEST_NODE_VERSION }} | |
| - name: Install pnpm and dependencies | |
| uses: apify/workflows/pnpm-install@main | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Run Python tests | |
| env: | |
| TEST_USER_TOKEN: ${{ secrets.APIFY_TEST_USER_API_TOKEN }} | |
| run: pnpm run test:python | |
| docs: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[docs build]') }} | |
| name: Docs build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.LATEST_NODE_VERSION }} | |
| - name: Install pnpm and dependencies | |
| uses: apify/workflows/pnpm-install@main | |
| - name: Build & deploy docs | |
| run: pnpm --filter apify-cli-website run build | |
| build_bundles: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[docs build]') }} | |
| name: Bundles (${{ matrix.label }}) | |
| needs: [build] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| label: unix | |
| - os: windows-latest | |
| label: windows-x64 | |
| - os: windows-11-arm | |
| label: windows-arm64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ env.LATEST_NODE_VERSION }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.LATEST_NODE_VERSION }} | |
| - name: Install pnpm and dependencies | |
| uses: apify/workflows/pnpm-install@main | |
| - name: Install bun | |
| uses: oven-sh/setup-bun@v2 | |
| if: ${{ matrix.os != 'windows-11-arm' }} | |
| with: | |
| bun-version-file: .bun-version | |
| no-cache: true | |
| - name: Install bun (Windows ARM) | |
| if: ${{ matrix.os == 'windows-11-arm' }} | |
| run: | | |
| $bunVersion = (Get-Content .bun-version).Trim() | |
| irm bun.sh/install.ps1 -OutFile install.ps1 | |
| # Bun doesn't have Windows ARM64 builds, so the setup-bun action fails. The install script however, | |
| # does "support" it. | |
| .\install.ps1 -Version $bunVersion | |
| Join-Path (Resolve-Path ~).Path ".bun\bin" >> $env:GITHUB_PATH | |
| # https://github.com/oven-sh/bun/issues/11198 | |
| - name: Fix cross-platform building on Actions | |
| if: ${{ matrix.os != 'ubuntu-latest' }} | |
| run: | | |
| mkdir C:\test | |
| cd C:\test | |
| bun init -y | |
| bun build --compile --target=bun-windows-x64 --outfile test index.ts | |
| bun build --compile --target=bun-windows-x64-baseline --outfile test index.ts | |
| - name: Build Bundles | |
| run: pnpm run insert-cli-metadata && pnpm run build-bundles | |
| - name: Upload Bundles | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: apify-cli-bundles-${{ matrix.label }} | |
| path: bundles/** |