Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
ci: reduce main CI orchestration scheduling overhead (#43114)
Stephen Zhouce27ef9dc3c0
diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.ymlindex d6cc9bf8c72..7e1e34967dd 100644--- a/.github/workflows/main-ci.yml+++ b/.github/workflows/main-ci.yml@@ -21,9 +21,10 @@ concurrency:cancel-in-progress: ${{ github.event_name == 'merge_group' }}jobs:+ # Keep orchestration independent of the Depot pool used for test execution.pre_job:name: Skip Duplicate Checks- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04outputs:should_skip: ${{ steps.skip_check.outputs.should_skip || 'false' }}steps:@@ -37,7 +38,7 @@ jobs:# Check which paths were changed to determine which tests to runcheck-changes:name: Check Changed Files- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04outputs:api-changed: ${{ steps.changes.outputs.api }}cli-changed: ${{ steps.changes.outputs.cli }}@@ -215,7 +216,8 @@ jobs:- '.editorconfig'- '.vite-hooks/**'- # Run tests in parallel while always emitting stable required checks.+ # Finalizers report unchanged paths directly, avoiding separate skip-only jobs.+ # Keep each required check name stable and fail closed if classification fails.api-tests-run:name: Run API Testsneeds:@@ -225,17 +227,6 @@ jobs:uses: ./.github/workflows/api-tests.ymlsecrets: inherit- api-tests-skip:- name: Skip API Tests- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.api-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped API tests- run: echo "No API-related changes detected; skipping API tests."-api-tests:name: API Testsif: ${{ always() }}@@ -243,21 +234,26 @@ jobs:- pre_job- check-changes- api-tests-run- - api-tests-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize API Tests statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.api-changed }}RUN_RESULT: ${{ needs.api-tests-run.result }}- SKIP_RESULT: ${{ needs.api-tests-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "API tests were skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "API tests ran successfully."@@ -268,12 +264,12 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "API tests were skipped because no API-related files changed."exit 0fi- echo "API tests were not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1cli-tests-run:@@ -285,17 +281,6 @@ jobs:uses: ./.github/workflows/cli-tests.ymlsecrets: inherit- cli-tests-skip:- name: Skip CLI Tests- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.cli-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped CLI tests- run: echo "No CLI-related changes detected; skipping CLI tests."-cli-tests:name: CLI Testsif: ${{ always() }}@@ -303,21 +288,26 @@ jobs:- pre_job- check-changes- cli-tests-run- - cli-tests-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize CLI Tests statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.cli-changed }}RUN_RESULT: ${{ needs.cli-tests-run.result }}- SKIP_RESULT: ${{ needs.cli-tests-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "CLI tests were skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "CLI tests ran successfully."@@ -328,12 +318,12 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "CLI tests were skipped because no CLI-related files changed."exit 0fi- echo "CLI tests were not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1web-tests-run:@@ -345,17 +335,6 @@ jobs:uses: ./.github/workflows/web-tests.ymlsecrets: inherit- web-tests-skip:- name: Skip Web Tests- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.web-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped web tests- run: echo "No web-related changes detected; skipping web tests."-web-tests:name: Web Testsif: ${{ always() }}@@ -363,21 +342,26 @@ jobs:- pre_job- check-changes- web-tests-run- - web-tests-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize Web Tests statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.web-changed }}RUN_RESULT: ${{ needs.web-tests-run.result }}- SKIP_RESULT: ${{ needs.web-tests-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "Web tests were skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "Web tests ran successfully."@@ -388,12 +372,12 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "Web tests were skipped because no web-related files changed."exit 0fi- echo "Web tests were not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1web-e2e-run:@@ -407,17 +391,6 @@ jobs:run-external-runtime: falsesecrets: inherit- web-e2e-skip:- name: Skip Web Full-Stack E2E- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.e2e-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped web full-stack e2e- run: echo "No E2E-related changes detected; skipping web full-stack E2E."-web-e2e:name: Web Full-Stack E2Eif: ${{ always() }}@@ -425,21 +398,26 @@ jobs:- pre_job- check-changes- web-e2e-run- - web-e2e-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize Web Full-Stack E2E statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.e2e-changed }}RUN_RESULT: ${{ needs.web-e2e-run.result }}- SKIP_RESULT: ${{ needs.web-e2e-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "Web full-stack E2E was skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "Web full-stack E2E ran successfully."@@ -450,12 +428,12 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "Web full-stack E2E was skipped because no E2E-related files changed."exit 0fi- echo "Web full-stack E2E was not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1style-check:@@ -483,17 +461,6 @@ jobs:if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.vdb-changed == 'true'uses: ./.github/workflows/vdb-tests.yml- vdb-tests-skip:- name: Skip VDB Tests- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.vdb-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped VDB tests- run: echo "No VDB-related changes detected; skipping VDB tests."-vdb-tests:name: VDB Testsif: ${{ always() }}@@ -501,21 +468,26 @@ jobs:- pre_job- check-changes- vdb-tests-run- - vdb-tests-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize VDB Tests statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.vdb-changed }}RUN_RESULT: ${{ needs.vdb-tests-run.result }}- SKIP_RESULT: ${{ needs.vdb-tests-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "VDB tests were skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "VDB tests ran successfully."@@ -526,12 +498,12 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "VDB tests were skipped because no VDB-related files changed."exit 0fi- echo "VDB tests were not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1db-migration-test-run:@@ -542,17 +514,6 @@ jobs:if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.migration-changed == 'true'uses: ./.github/workflows/db-migration-test.yml- db-migration-test-skip:- name: Skip DB Migration Test- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.migration-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped DB migration tests- run: echo "No migration-related changes detected; skipping DB migration tests."-db-migration-test:name: DB Migration Testif: ${{ always() }}@@ -560,21 +521,26 @@ jobs:- pre_job- check-changes- db-migration-test-run- - db-migration-test-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize DB Migration Test statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.migration-changed }}RUN_RESULT: ${{ needs.db-migration-test-run.result }}- SKIP_RESULT: ${{ needs.db-migration-test-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "DB migration tests were skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "DB migration tests ran successfully."@@ -585,12 +551,12 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "DB migration tests were skipped because no migration-related files changed."exit 0fi- echo "DB migration tests were not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1sandbox-runtime-tests-run:@@ -602,17 +568,6 @@ jobs:uses: ./.github/workflows/sandbox-runtime-tests.ymlsecrets: inherit- sandbox-runtime-tests-skip:- name: Skip Sandbox Runtime Tests- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.sandbox-runtime-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped sandbox runtime tests- run: echo "No sandbox-runtime-related changes detected; skipping sandbox runtime tests."-sandbox-runtime-tests:name: Sandbox Runtime Testsif: ${{ always() }}@@ -620,21 +575,26 @@ jobs:- pre_job- check-changes- sandbox-runtime-tests-run- - sandbox-runtime-tests-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize Sandbox Runtime Tests statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.sandbox-runtime-changed }}RUN_RESULT: ${{ needs.sandbox-runtime-tests-run.result }}- SKIP_RESULT: ${{ needs.sandbox-runtime-tests-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "Sandbox runtime tests were skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "Sandbox runtime tests ran successfully."@@ -645,12 +605,12 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "Sandbox runtime tests were skipped because no sandbox-runtime-related files changed."exit 0fi- echo "Sandbox runtime tests were not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1dify-agent-tests-run:@@ -662,17 +622,6 @@ jobs:uses: ./.github/workflows/dify-agent-tests.ymlsecrets: inherit- dify-agent-tests-skip:- name: Skip Dify Agent Tests- needs:- - pre_job- - check-changes- if: needs.pre_job.outputs.should_skip != 'true' && needs.check-changes.outputs.dify-agent-changed != 'true'- runs-on: depot-ubuntu-24.04- steps:- - name: Report skipped dify agent tests- run: echo "No dify-agent-related changes detected; skipping dify agent tests."-dify-agent-tests:name: Dify Agent Testsif: ${{ always() }}@@ -680,21 +629,26 @@ jobs:- pre_job- check-changes- dify-agent-tests-run- - dify-agent-tests-skip- runs-on: depot-ubuntu-24.04+ runs-on: ubuntu-24.04steps:- name: Finalize Dify Agent Tests statusenv:SHOULD_SKIP_WORKFLOW: ${{ needs.pre_job.outputs.should_skip }}TESTS_CHANGED: ${{ needs.check-changes.outputs.dify-agent-changed }}RUN_RESULT: ${{ needs.dify-agent-tests-run.result }}- SKIP_RESULT: ${{ needs.dify-agent-tests-skip.result }}+ PRE_JOB_RESULT: ${{ needs.pre_job.result }}+ CHANGES_RESULT: ${{ needs.check-changes.result }}run: |if [[ "$SHOULD_SKIP_WORKFLOW" == 'true' ]]; thenecho "Dify agent tests were skipped because this workflow run duplicated a successful or newer run."exit 0fi+ if [[ "$PRE_JOB_RESULT" != 'success' || "$CHANGES_RESULT" != 'success' ]]; then+ echo "Cannot finalize tests: duplicate check=$PRE_JOB_RESULT, change detection=$CHANGES_RESULT" >&2+ exit 1+ fi+if [[ "$TESTS_CHANGED" == 'true' ]]; thenif [[ "$RUN_RESULT" == 'success' ]]; thenecho "Dify agent tests ran successfully."@@ -705,10 +659,10 @@ jobs:exit 1fi- if [[ "$SKIP_RESULT" == 'success' ]]; then+ if [[ "$TESTS_CHANGED" == 'false' && "$RUN_RESULT" == 'skipped' ]]; thenecho "Dify agent tests were skipped because no dify-agent-related files changed."exit 0fi- echo "Dify agent tests were not required, but the skip job finished with result: $SKIP_RESULT" >&2+ echo "Unexpected test state: changed=$TESTS_CHANGED, result=$RUN_RESULT" >&2exit 1