CI Mainline #161
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 Mainline | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| run_extended_integration: | |
| description: "是否运行扩展 integration 层" | |
| required: false | |
| default: false | |
| type: boolean | |
| platforms: | |
| description: "选择要运行的平台验证(不选则全部运行)" | |
| required: false | |
| type: choice | |
| multiple: true | |
| options: | |
| - linux-x64 | |
| - windows-x64 | |
| - macos-arm64 | |
| - macos-x64 | |
| schedule: | |
| - cron: "0 2 * * *" | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| pr-required-min-compat: | |
| name: pr-required min-compat (ubuntu-latest, py3.11) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install minimum supported dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[test,dev,browser,web]" -c constraints/min-py311.txt | |
| - name: Run pyright | |
| run: pyright | |
| - name: Run required pytest lane | |
| run: pytest -q --timeout=60 -m "not integration and not slow and not e2e" | |
| pr-required-lock-smoke: | |
| name: pr-required lock-smoke (linux-x64, py3.11) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install locked dependencies | |
| uses: ./.github/actions/install-locked-env | |
| with: | |
| constraints-path: constraints/lock-linux-x64-py311.txt | |
| - name: Run required Docling integration smoke | |
| run: | | |
| pytest -q --timeout=120 \ | |
| tests/engine/test_docling_processor_integration.py \ | |
| tests/fins/test_docling_upload_service_integration.py \ | |
| tests/engine/test_web_fetch_docling_integration.py | |
| - name: Build and smoke test offline bundle | |
| uses: ./.github/actions/build-and-smoke-offline-bundle | |
| with: | |
| constraints-path: constraints/lock-linux-x64-py311.txt | |
| platform-id: linux-x64 | |
| extended-integration: | |
| name: extended integration (ubuntu-latest, py3.11) | |
| runs-on: ubuntu-latest | |
| if: > | |
| github.event_name == 'push' || | |
| github.event_name == 'schedule' || | |
| (github.event_name == 'workflow_dispatch' && | |
| inputs.run_extended_integration == true) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install locked dependencies | |
| uses: ./.github/actions/install-locked-env | |
| with: | |
| constraints-path: constraints/lock-linux-x64-py311.txt | |
| - name: Run extended integration lane | |
| run: pytest -q --timeout=120 -m "integration and not e2e" | |
| full-platform-validation-linux-x64: | |
| name: full-platform-validation linux-x64 (py3.11) | |
| runs-on: ubuntu-latest | |
| if: > | |
| github.event_name == 'push' || | |
| github.event_name == 'schedule' || | |
| (github.event_name == 'workflow_dispatch' && | |
| (contains(inputs.platforms, 'linux-x64') || inputs.platforms == '')) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install locked dependencies | |
| uses: ./.github/actions/install-locked-env | |
| with: | |
| constraints-path: constraints/lock-linux-x64-py311.txt | |
| - name: Run pyright | |
| run: pyright | |
| - name: Run full pytest lane | |
| run: pytest -q --timeout=60 | |
| - name: Build and smoke test offline bundle | |
| uses: ./.github/actions/build-and-smoke-offline-bundle | |
| with: | |
| constraints-path: constraints/lock-linux-x64-py311.txt | |
| platform-id: linux-x64 | |
| full-platform-validation-windows-x64: | |
| name: full-platform-validation windows-x64 (py3.11) | |
| runs-on: windows-latest | |
| if: > | |
| github.event_name == 'push' || | |
| github.event_name == 'schedule' || | |
| (github.event_name == 'workflow_dispatch' && | |
| (contains(inputs.platforms, 'windows-x64') || inputs.platforms == '')) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install locked dependencies | |
| uses: ./.github/actions/install-locked-env | |
| with: | |
| constraints-path: constraints/lock-windows-x64-py311.txt | |
| - name: Run pyright | |
| shell: bash | |
| run: pyright --pythonplatform Linux | |
| - name: Run full pytest lane | |
| run: pytest -q --timeout=60 | |
| - name: Build and smoke test offline bundle | |
| uses: ./.github/actions/build-and-smoke-offline-bundle | |
| with: | |
| constraints-path: constraints/lock-windows-x64-py311.txt | |
| platform-id: windows-x64 | |
| full-platform-validation-macos-arm64: | |
| name: full-platform-validation macos-arm64 (py3.11) | |
| runs-on: macos-14 | |
| if: > | |
| github.event_name == 'push' || | |
| github.event_name == 'schedule' || | |
| (github.event_name == 'workflow_dispatch' && | |
| (contains(inputs.platforms, 'macos-arm64') || inputs.platforms == '')) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install locked dependencies | |
| uses: ./.github/actions/install-locked-env | |
| with: | |
| constraints-path: constraints/lock-macos-arm64-py311.txt | |
| - name: Run pyright | |
| run: pyright | |
| - name: Run full pytest lane | |
| run: pytest -q --timeout=60 | |
| - name: Build and smoke test offline bundle | |
| uses: ./.github/actions/build-and-smoke-offline-bundle | |
| with: | |
| constraints-path: constraints/lock-macos-arm64-py311.txt | |
| platform-id: macos-arm64 | |
| full-platform-validation-macos-x64: | |
| name: full-platform-validation macos-x64 (py3.11) | |
| runs-on: [self-hosted, macOS, X64] | |
| continue-on-error: true | |
| timeout-minutes: 30 | |
| if: > | |
| github.event_name == 'push' || | |
| github.event_name == 'schedule' || | |
| (github.event_name == 'workflow_dispatch' && | |
| (contains(inputs.platforms, 'macos-x64') || inputs.platforms == '')) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install locked dependencies | |
| uses: ./.github/actions/install-locked-env | |
| with: | |
| constraints-path: constraints/lock-macos-x64-py311.txt | |
| - name: Run pyright | |
| run: pyright | |
| - name: Run full pytest lane | |
| run: pytest -q --timeout=60 | |
| - name: Build and smoke test offline bundle | |
| uses: ./.github/actions/build-and-smoke-offline-bundle | |
| with: | |
| constraints-path: constraints/lock-macos-x64-py311.txt | |
| platform-id: macos-x64 |