File tree Expand file tree Collapse file tree 2 files changed +37
-4
lines changed
Expand file tree Collapse file tree 2 files changed +37
-4
lines changed Original file line number Diff line number Diff line change 8686 [
8787 .agents,
8888 backend,
89- cli,
9089 common,
9190 npm-app,
9291 packages/agent-runtime,
9897 include :
9998 - package : .agents
10099 - package : backend
101- - package : cli
102100 - package : common
103101 - package : npm-app
104102 - package : packages/agent-runtime
@@ -258,8 +256,6 @@ jobs:
258256 else
259257 echo "No integration tests found in .agents"
260258 fi
261- elif [ "${{ matrix.package }}" = "cli" ]; then
262- find src -name '*.integration.test.ts' | sort | xargs -I {} bun test --timeout=180000 {}
263259 else
264260 find src -name '*.integration.test.ts' | sort | xargs -I {} bun test --timeout=60000 {}
265261 fi
Original file line number Diff line number Diff line change 2828 default : ' {}'
2929
3030jobs :
31+ cli-integration-tests :
32+ runs-on : ubuntu-latest
33+ steps :
34+ - uses : actions/checkout@v4
35+ with :
36+ ref : ${{ inputs.checkout-ref || github.sha }}
37+
38+ - uses : ./.github/actions/setup-project
39+
40+ - name : Set environment variables
41+ env :
42+ SECRETS_CONTEXT : ${{ toJSON(secrets) }}
43+ ENV_OVERRIDES : ${{ inputs.env-overrides }}
44+ shell : bash
45+ run : |
46+ VAR_NAMES=$(bun scripts/generate-ci-env.ts --scope client)
47+
48+ echo "$SECRETS_CONTEXT" | jq -r --argjson vars "$VAR_NAMES" '
49+ to_entries | .[] | select(.key as $k | $vars | index($k)) | .key + "=" + .value
50+ ' >> $GITHUB_ENV
51+ echo "CODEBUFF_GITHUB_ACTIONS=true" >> $GITHUB_ENV
52+ echo "NEXT_PUBLIC_CB_ENVIRONMENT=test" >> $GITHUB_ENV
53+ echo "CODEBUFF_GITHUB_TOKEN=${{ secrets.CODEBUFF_GITHUB_TOKEN }}" >> $GITHUB_ENV
54+ if [ "$ENV_OVERRIDES" != "{}" ]; then
55+ echo "$ENV_OVERRIDES" | jq -r 'to_entries | .[] | .key + "=" + .value' >> $GITHUB_ENV
56+ fi
57+
58+ - name : Build SDK before CLI integration tests
59+ run : cd sdk && bun run build
60+
61+ - name : Run CLI integration tests
62+ run : |
63+ cd cli
64+ find src -name '*.integration.test.ts' | sort | xargs -I {} bun test --timeout=180000 {}
65+
3166 build-binaries :
67+ needs : cli-integration-tests
3268 strategy :
3369 matrix :
3470 include :
@@ -197,6 +233,7 @@ jobs:
197233 path : ${{ inputs.binary-name }}-${{ matrix.target }}.tar.gz
198234
199235 build-windows-binary :
236+ needs : cli-integration-tests
200237 runs-on : windows-latest
201238 steps :
202239 - uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments