@invarn/cibuild 2.9.6 → 2.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-35SI42CD.mjs +1 -0
- package/dist/chunk-IC45KVLJ.mjs +1 -0
- package/dist/chunk-XDY4V23V.mjs +1 -0
- package/dist/cli.cjs +14 -14
- package/dist/commands.mjs +1 -0
- package/dist/lib.mjs +3934 -0
- package/package.json +6 -10
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js +0 -399
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts +0 -38
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-target-follows-the-flavor-source-set.test.js +0 -222
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts +0 -41
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/a-credential-two-workflows-cannot-share-is-declared-per-workflow.test.js +0 -324
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts +0 -2
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.d.ts.map +0 -1
- package/dist/src/commands/a-properties-stand-in-declares-the-keys-the-build-reads.test.js +0 -382
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts +0 -29
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.d.ts.map +0 -1
- package/dist/src/commands/an-already-stored-value-does-not-answer-the-target-question.test.js +0 -160
- package/dist/src/commands/android-gms-guard.test.d.ts +0 -9
- package/dist/src/commands/android-gms-guard.test.d.ts.map +0 -1
- package/dist/src/commands/android-gms-guard.test.js +0 -78
- package/dist/src/commands/android-java-version.test.d.ts +0 -12
- package/dist/src/commands/android-java-version.test.d.ts.map +0 -1
- package/dist/src/commands/android-java-version.test.js +0 -209
- package/dist/src/commands/android-scanner-java.test.d.ts +0 -2
- package/dist/src/commands/android-scanner-java.test.d.ts.map +0 -1
- package/dist/src/commands/android-scanner-java.test.js +0 -130
- package/dist/src/commands/android-scanner.d.ts +0 -250
- package/dist/src/commands/android-scanner.d.ts.map +0 -1
- package/dist/src/commands/android-scanner.js +0 -1639
- package/dist/src/commands/build.d.ts +0 -215
- package/dist/src/commands/build.d.ts.map +0 -1
- package/dist/src/commands/build.js +0 -1433
- package/dist/src/commands/build.test.d.ts +0 -13
- package/dist/src/commands/build.test.d.ts.map +0 -1
- package/dist/src/commands/build.test.js +0 -121
- package/dist/src/commands/detect-platform.d.ts +0 -13
- package/dist/src/commands/detect-platform.d.ts.map +0 -1
- package/dist/src/commands/detect-platform.js +0 -51
- package/dist/src/commands/detect-project.d.ts +0 -7
- package/dist/src/commands/detect-project.d.ts.map +0 -1
- package/dist/src/commands/detect-project.js +0 -12
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts +0 -26
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.d.ts.map +0 -1
- package/dist/src/commands/each-flavor-is-asked-for-its-own-properties-file.test.js +0 -196
- package/dist/src/commands/edit.d.ts +0 -12
- package/dist/src/commands/edit.d.ts.map +0 -1
- package/dist/src/commands/edit.js +0 -652
- package/dist/src/commands/edit.test.d.ts +0 -6
- package/dist/src/commands/edit.test.d.ts.map +0 -1
- package/dist/src/commands/edit.test.js +0 -45
- package/dist/src/commands/fidelity-trim.d.ts +0 -13
- package/dist/src/commands/fidelity-trim.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.js +0 -21
- package/dist/src/commands/fidelity-trim.test.d.ts +0 -8
- package/dist/src/commands/fidelity-trim.test.d.ts.map +0 -1
- package/dist/src/commands/fidelity-trim.test.js +0 -79
- package/dist/src/commands/file-secret-collector.d.ts +0 -50
- package/dist/src/commands/file-secret-collector.d.ts.map +0 -1
- package/dist/src/commands/file-secret-collector.js +0 -217
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts +0 -38
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.d.ts.map +0 -1
- package/dist/src/commands/flavors-a-convention-plugin-creates-are-still-found.test.js +0 -300
- package/dist/src/commands/github-workflow.d.ts +0 -5
- package/dist/src/commands/github-workflow.d.ts.map +0 -1
- package/dist/src/commands/github-workflow.js +0 -45
- package/dist/src/commands/index.d.ts +0 -33
- package/dist/src/commands/index.d.ts.map +0 -1
- package/dist/src/commands/index.js +0 -33
- package/dist/src/commands/init.d.ts +0 -20
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js +0 -264
- package/dist/src/commands/ios-scanner.d.ts +0 -104
- package/dist/src/commands/ios-scanner.d.ts.map +0 -1
- package/dist/src/commands/ios-scanner.js +0 -492
- package/dist/src/commands/ios-scheme-ranking.test.d.ts +0 -2
- package/dist/src/commands/ios-scheme-ranking.test.d.ts.map +0 -1
- package/dist/src/commands/ios-scheme-ranking.test.js +0 -264
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts +0 -30
- package/dist/src/commands/local-properties-reaches-every-workflow.test.d.ts.map +0 -1
- package/dist/src/commands/local-properties-reaches-every-workflow.test.js +0 -146
- package/dist/src/commands/reset.d.ts +0 -7
- package/dist/src/commands/reset.d.ts.map +0 -1
- package/dist/src/commands/reset.js +0 -81
- package/dist/src/commands/run.d.ts +0 -22
- package/dist/src/commands/run.d.ts.map +0 -1
- package/dist/src/commands/run.js +0 -141
- package/dist/src/commands/secrets-sync-workflow.d.ts +0 -15
- package/dist/src/commands/secrets-sync-workflow.d.ts.map +0 -1
- package/dist/src/commands/secrets-sync-workflow.js +0 -255
- package/dist/src/commands/secrets-upload.d.ts +0 -21
- package/dist/src/commands/secrets-upload.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.js +0 -177
- package/dist/src/commands/secrets-upload.test.d.ts +0 -5
- package/dist/src/commands/secrets-upload.test.d.ts.map +0 -1
- package/dist/src/commands/secrets-upload.test.js +0 -60
- package/dist/src/commands/validate.d.ts +0 -10
- package/dist/src/commands/validate.d.ts.map +0 -1
- package/dist/src/commands/validate.js +0 -46
- package/dist/src/config.d.ts +0 -3
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -47
- package/dist/src/envman/cli.d.ts +0 -21
- package/dist/src/envman/cli.d.ts.map +0 -1
- package/dist/src/envman/cli.js +0 -240
- package/dist/src/envman/envman.d.ts +0 -83
- package/dist/src/envman/envman.d.ts.map +0 -1
- package/dist/src/envman/envman.js +0 -361
- package/dist/src/envman/envman.test.d.ts +0 -5
- package/dist/src/envman/envman.test.d.ts.map +0 -1
- package/dist/src/envman/envman.test.js +0 -236
- package/dist/src/envman/envstore-round-trip.test.d.ts +0 -27
- package/dist/src/envman/envstore-round-trip.test.d.ts.map +0 -1
- package/dist/src/envman/envstore-round-trip.test.js +0 -130
- package/dist/src/envman/index.d.ts +0 -23
- package/dist/src/envman/index.d.ts.map +0 -1
- package/dist/src/envman/index.js +0 -23
- package/dist/src/envman/shim.d.ts +0 -16
- package/dist/src/envman/shim.d.ts.map +0 -1
- package/dist/src/envman/shim.js +0 -66
- package/dist/src/envman/types.d.ts +0 -55
- package/dist/src/envman/types.d.ts.map +0 -1
- package/dist/src/envman/types.js +0 -12
- package/dist/src/lib.d.ts +0 -33
- package/dist/src/lib.d.ts.map +0 -1
- package/dist/src/lib.js +0 -37
- package/dist/src/pipeline.d.ts +0 -3
- package/dist/src/pipeline.d.ts.map +0 -1
- package/dist/src/pipeline.js +0 -57
- package/dist/src/runner-node-step.test.d.ts +0 -12
- package/dist/src/runner-node-step.test.d.ts.map +0 -1
- package/dist/src/runner-node-step.test.js +0 -61
- package/dist/src/runner.d.ts +0 -31
- package/dist/src/runner.d.ts.map +0 -1
- package/dist/src/runner.js +0 -240
- package/dist/src/shared/detect-project.d.ts +0 -57
- package/dist/src/shared/detect-project.d.ts.map +0 -1
- package/dist/src/shared/detect-project.js +0 -219
- package/dist/src/shared/detect-project.test.d.ts +0 -2
- package/dist/src/shared/detect-project.test.d.ts.map +0 -1
- package/dist/src/shared/detect-project.test.js +0 -161
- package/dist/src/shared/git.d.ts +0 -25
- package/dist/src/shared/git.d.ts.map +0 -1
- package/dist/src/shared/git.js +0 -53
- package/dist/src/shared/git.test.d.ts +0 -9
- package/dist/src/shared/git.test.d.ts.map +0 -1
- package/dist/src/shared/git.test.js +0 -66
- package/dist/src/shared/gitignore.d.ts +0 -6
- package/dist/src/shared/gitignore.d.ts.map +0 -1
- package/dist/src/shared/gitignore.js +0 -26
- package/dist/src/shared/gradle-settings.d.ts +0 -49
- package/dist/src/shared/gradle-settings.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.js +0 -138
- package/dist/src/shared/gradle-settings.test.d.ts +0 -2
- package/dist/src/shared/gradle-settings.test.d.ts.map +0 -1
- package/dist/src/shared/gradle-settings.test.js +0 -65
- package/dist/src/shared/prompts.d.ts +0 -30
- package/dist/src/shared/prompts.d.ts.map +0 -1
- package/dist/src/shared/prompts.js +0 -121
- package/dist/src/shared/xcode-container.test.d.ts +0 -2
- package/dist/src/shared/xcode-container.test.d.ts.map +0 -1
- package/dist/src/shared/xcode-container.test.js +0 -123
- package/dist/src/step-marker.d.ts +0 -12
- package/dist/src/step-marker.d.ts.map +0 -1
- package/dist/src/step-marker.js +0 -29
- package/dist/src/step-marker.test.d.ts +0 -11
- package/dist/src/step-marker.test.d.ts.map +0 -1
- package/dist/src/step-marker.test.js +0 -45
- package/dist/src/types.d.ts +0 -58
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -2
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts +0 -28
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.d.ts.map +0 -1
- package/dist/src/yaml/a-cache-path-must-not-swallow-a-credential.test.js +0 -223
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts +0 -20
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-secret-reaches-the-file-step.test.js +0 -201
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts +0 -37
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.d.ts.map +0 -1
- package/dist/src/yaml/a-declared-slot-may-name-the-workflow-it-belongs-to.test.js +0 -255
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts +0 -32
- package/dist/src/yaml/a-missing-credential-is-loud.test.d.ts.map +0 -1
- package/dist/src/yaml/a-missing-credential-is-loud.test.js +0 -301
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts +0 -18
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.d.ts.map +0 -1
- package/dist/src/yaml/a-runtime-requirement-names-a-real-provider.test.js +0 -66
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts +0 -34
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-scoped-slot-must-name-a-workflow-the-pipeline-has.test.js +0 -218
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts +0 -27
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.d.ts.map +0 -1
- package/dist/src/yaml/a-value-this-instance-stored-is-a-value-it-has.test.js +0 -126
- package/dist/src/yaml/bitrise-compat.d.ts +0 -65
- package/dist/src/yaml/bitrise-compat.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.js +0 -206
- package/dist/src/yaml/bitrise-compat.test.d.ts +0 -5
- package/dist/src/yaml/bitrise-compat.test.d.ts.map +0 -1
- package/dist/src/yaml/bitrise-compat.test.js +0 -347
- package/dist/src/yaml/cache-key-missing-file.test.d.ts +0 -12
- package/dist/src/yaml/cache-key-missing-file.test.d.ts.map +0 -1
- package/dist/src/yaml/cache-key-missing-file.test.js +0 -116
- package/dist/src/yaml/converter.d.ts +0 -103
- package/dist/src/yaml/converter.d.ts.map +0 -1
- package/dist/src/yaml/converter.js +0 -420
- package/dist/src/yaml/converter.test.d.ts +0 -5
- package/dist/src/yaml/converter.test.d.ts.map +0 -1
- package/dist/src/yaml/converter.test.js +0 -548
- package/dist/src/yaml/e2e.test.d.ts +0 -6
- package/dist/src/yaml/e2e.test.d.ts.map +0 -1
- package/dist/src/yaml/e2e.test.js +0 -446
- package/dist/src/yaml/env-resolver.d.ts +0 -218
- package/dist/src/yaml/env-resolver.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.js +0 -591
- package/dist/src/yaml/env-resolver.test.d.ts +0 -5
- package/dist/src/yaml/env-resolver.test.d.ts.map +0 -1
- package/dist/src/yaml/env-resolver.test.js +0 -502
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts +0 -16
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.d.ts.map +0 -1
- package/dist/src/yaml/every-build-log-witnesses-the-commit-on-disk.test.js +0 -126
- package/dist/src/yaml/fidelity-input-digest.d.ts +0 -37
- package/dist/src/yaml/fidelity-input-digest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.js +0 -208
- package/dist/src/yaml/fidelity-input-digest.test.d.ts +0 -2
- package/dist/src/yaml/fidelity-input-digest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-input-digest.test.js +0 -167
- package/dist/src/yaml/fidelity-manifest.d.ts +0 -126
- package/dist/src/yaml/fidelity-manifest.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.js +0 -134
- package/dist/src/yaml/fidelity-manifest.test.d.ts +0 -12
- package/dist/src/yaml/fidelity-manifest.test.d.ts.map +0 -1
- package/dist/src/yaml/fidelity-manifest.test.js +0 -251
- package/dist/src/yaml/interactive-prompts.d.ts +0 -71
- package/dist/src/yaml/interactive-prompts.d.ts.map +0 -1
- package/dist/src/yaml/interactive-prompts.js +0 -260
- package/dist/src/yaml/meta-helpers.d.ts +0 -28
- package/dist/src/yaml/meta-helpers.d.ts.map +0 -1
- package/dist/src/yaml/meta-helpers.js +0 -46
- package/dist/src/yaml/missing-env-handler.d.ts +0 -45
- package/dist/src/yaml/missing-env-handler.d.ts.map +0 -1
- package/dist/src/yaml/missing-env-handler.js +0 -64
- package/dist/src/yaml/parser.d.ts +0 -33
- package/dist/src/yaml/parser.d.ts.map +0 -1
- package/dist/src/yaml/parser.js +0 -148
- package/dist/src/yaml/parser.test.d.ts +0 -5
- package/dist/src/yaml/parser.test.d.ts.map +0 -1
- package/dist/src/yaml/parser.test.js +0 -83
- package/dist/src/yaml/pipeline-with-secrets.d.ts +0 -25
- package/dist/src/yaml/pipeline-with-secrets.d.ts.map +0 -1
- package/dist/src/yaml/pipeline-with-secrets.js +0 -76
- package/dist/src/yaml/platform-detector.d.ts +0 -83
- package/dist/src/yaml/platform-detector.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.js +0 -189
- package/dist/src/yaml/platform-detector.test.d.ts +0 -5
- package/dist/src/yaml/platform-detector.test.d.ts.map +0 -1
- package/dist/src/yaml/platform-detector.test.js +0 -525
- package/dist/src/yaml/preflight-validation.d.ts +0 -29
- package/dist/src/yaml/preflight-validation.d.ts.map +0 -1
- package/dist/src/yaml/preflight-validation.js +0 -21
- package/dist/src/yaml/secrets-manager.d.ts +0 -87
- package/dist/src/yaml/secrets-manager.d.ts.map +0 -1
- package/dist/src/yaml/secrets-manager.js +0 -230
- package/dist/src/yaml/shell-assignments.d.ts +0 -40
- package/dist/src/yaml/shell-assignments.d.ts.map +0 -1
- package/dist/src/yaml/shell-assignments.js +0 -77
- package/dist/src/yaml/step-validator-check-failure.test.d.ts +0 -24
- package/dist/src/yaml/step-validator-check-failure.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-check-failure.test.js +0 -130
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts +0 -23
- package/dist/src/yaml/step-validator-self-assigned.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator-self-assigned.test.js +0 -191
- package/dist/src/yaml/step-validator.d.ts +0 -67
- package/dist/src/yaml/step-validator.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.js +0 -466
- package/dist/src/yaml/step-validator.test.d.ts +0 -18
- package/dist/src/yaml/step-validator.test.d.ts.map +0 -1
- package/dist/src/yaml/step-validator.test.js +0 -140
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.d.ts +0 -2
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/a-missing-pinned-jdk-yields-for-every-gradle-run.test.js +0 -96
- package/dist/src/yaml/steps/android-sign.d.ts +0 -35
- package/dist/src/yaml/steps/android-sign.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-sign.js +0 -147
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts +0 -2
- package/dist/src/yaml/steps/android-variant-resolution.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-variant-resolution.test.js +0 -260
- package/dist/src/yaml/steps/android-version.d.ts +0 -26
- package/dist/src/yaml/steps/android-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.js +0 -128
- package/dist/src/yaml/steps/android-version.test.d.ts +0 -5
- package/dist/src/yaml/steps/android-version.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/android-version.test.js +0 -196
- package/dist/src/yaml/steps/android.d.ts +0 -156
- package/dist/src/yaml/steps/android.d.ts.map +0 -1
- package/dist/src/yaml/steps/android.js +0 -1100
- package/dist/src/yaml/steps/app-store-deploy.d.ts +0 -48
- package/dist/src/yaml/steps/app-store-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/app-store-deploy.js +0 -167
- package/dist/src/yaml/steps/base.d.ts +0 -263
- package/dist/src/yaml/steps/base.d.ts.map +0 -1
- package/dist/src/yaml/steps/base.js +0 -380
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts +0 -26
- package/dist/src/yaml/steps/bitrise-android-tools.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.js +0 -200
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-android-tools.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-android-tools.test.js +0 -280
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts +0 -22
- package/dist/src/yaml/steps/bitrise-apk-info.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.js +0 -144
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-apk-info.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-apk-info.test.js +0 -331
- package/dist/src/yaml/steps/bitrise-slack.d.ts +0 -49
- package/dist/src/yaml/steps/bitrise-slack.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.js +0 -280
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-slack.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-slack.test.js +0 -484
- package/dist/src/yaml/steps/bitrise-ssh.d.ts +0 -27
- package/dist/src/yaml/steps/bitrise-ssh.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.js +0 -134
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts +0 -5
- package/dist/src/yaml/steps/bitrise-ssh.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/bitrise-ssh.test.js +0 -205
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-pull-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-daemon.test.js +0 -212
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts +0 -42
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-pull-restore-roots.test.js +0 -209
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts +0 -27
- package/dist/src/yaml/steps/cache-push-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache-push-daemon.test.js +0 -171
- package/dist/src/yaml/steps/cache.d.ts +0 -59
- package/dist/src/yaml/steps/cache.d.ts.map +0 -1
- package/dist/src/yaml/steps/cache.js +0 -1027
- package/dist/src/yaml/steps/capture-injection.d.ts +0 -30
- package/dist/src/yaml/steps/capture-injection.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.js +0 -88
- package/dist/src/yaml/steps/capture-injection.test.d.ts +0 -2
- package/dist/src/yaml/steps/capture-injection.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/capture-injection.test.js +0 -163
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts +0 -42
- package/dist/src/yaml/steps/cocoapods-deployment-floor.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.js +0 -140
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts +0 -11
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-deployment-floor.test.js +0 -176
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts +0 -22
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-install-emits-valid-bash.test.js +0 -97
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-locked-bundler.test.js +0 -282
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts +0 -17
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/cocoapods-skip-if-absent.test.js +0 -132
- package/dist/src/yaml/steps/envstore-loader.test.d.ts +0 -15
- package/dist/src/yaml/steps/envstore-loader.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/envstore-loader.test.js +0 -143
- package/dist/src/yaml/steps/fastlane.d.ts +0 -27
- package/dist/src/yaml/steps/fastlane.d.ts.map +0 -1
- package/dist/src/yaml/steps/fastlane.js +0 -79
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts +0 -53
- package/dist/src/yaml/steps/fidelity-aspect-guard.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.js +0 -72
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts +0 -11
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-aspect-guard.test.js +0 -50
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts +0 -87
- package/dist/src/yaml/steps/fidelity-reference-provenance.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.js +0 -111
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts +0 -22
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/fidelity-reference-provenance.test.js +0 -118
- package/dist/src/yaml/steps/file.d.ts +0 -52
- package/dist/src/yaml/steps/file.d.ts.map +0 -1
- package/dist/src/yaml/steps/file.js +0 -108
- package/dist/src/yaml/steps/flutter.d.ts +0 -63
- package/dist/src/yaml/steps/flutter.d.ts.map +0 -1
- package/dist/src/yaml/steps/flutter.js +0 -215
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts +0 -16
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone-names-the-inputs-it-ignores.test.js +0 -127
- package/dist/src/yaml/steps/git-clone.d.ts +0 -32
- package/dist/src/yaml/steps/git-clone.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-clone.js +0 -171
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts +0 -10
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry-exec.test.js +0 -162
- package/dist/src/yaml/steps/git-fetch-retry.d.ts +0 -62
- package/dist/src/yaml/steps/git-fetch-retry.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.js +0 -155
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts +0 -5
- package/dist/src/yaml/steps/git-fetch-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/git-fetch-retry.test.js +0 -86
- package/dist/src/yaml/steps/google-play-deploy.d.ts +0 -37
- package/dist/src/yaml/steps/google-play-deploy.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.js +0 -193
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts +0 -5
- package/dist/src/yaml/steps/google-play-deploy.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/google-play-deploy.test.js +0 -310
- package/dist/src/yaml/steps/gradle-memory.d.ts +0 -91
- package/dist/src/yaml/steps/gradle-memory.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.js +0 -495
- package/dist/src/yaml/steps/gradle-memory.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-memory.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-memory.test.js +0 -344
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts +0 -28
- package/dist/src/yaml/steps/gradle-sdk-cmake.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.js +0 -107
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts +0 -2
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/gradle-sdk-cmake.test.js +0 -183
- package/dist/src/yaml/steps/index.d.ts +0 -10
- package/dist/src/yaml/steps/index.d.ts.map +0 -1
- package/dist/src/yaml/steps/index.js +0 -1461
- package/dist/src/yaml/steps/ios-deps.d.ts +0 -78
- package/dist/src/yaml/steps/ios-deps.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.js +0 -279
- package/dist/src/yaml/steps/ios-deps.test.d.ts +0 -5
- package/dist/src/yaml/steps/ios-deps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-deps.test.js +0 -90
- package/dist/src/yaml/steps/ios-signing.d.ts +0 -31
- package/dist/src/yaml/steps/ios-signing.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-signing.js +0 -144
- package/dist/src/yaml/steps/ios-version.d.ts +0 -47
- package/dist/src/yaml/steps/ios-version.d.ts.map +0 -1
- package/dist/src/yaml/steps/ios-version.js +0 -151
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts +0 -10
- package/dist/src/yaml/steps/java-home-version-spec.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/java-home-version-spec.test.js +0 -58
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.d.ts +0 -2
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/kotlin-metadata-compiles-on-a-daemon.test.js +0 -139
- package/dist/src/yaml/steps/linting.d.ts +0 -47
- package/dist/src/yaml/steps/linting.d.ts.map +0 -1
- package/dist/src/yaml/steps/linting.js +0 -148
- package/dist/src/yaml/steps/phase2.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase2.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase2.test.js +0 -197
- package/dist/src/yaml/steps/phase3.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase3.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase3.test.js +0 -144
- package/dist/src/yaml/steps/phase4.test.d.ts +0 -5
- package/dist/src/yaml/steps/phase4.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase4.test.js +0 -166
- package/dist/src/yaml/steps/phase5.test.d.ts +0 -6
- package/dist/src/yaml/steps/phase5.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/phase5.test.js +0 -263
- package/dist/src/yaml/steps/registry.d.ts +0 -88
- package/dist/src/yaml/steps/registry.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.js +0 -125
- package/dist/src/yaml/steps/registry.test.d.ts +0 -5
- package/dist/src/yaml/steps/registry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/registry.test.js +0 -235
- package/dist/src/yaml/steps/release.d.ts +0 -50
- package/dist/src/yaml/steps/release.d.ts.map +0 -1
- package/dist/src/yaml/steps/release.js +0 -154
- package/dist/src/yaml/steps/render-post-processor.d.ts +0 -100
- package/dist/src/yaml/steps/render-post-processor.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.js +0 -270
- package/dist/src/yaml/steps/render-post-processor.test.d.ts +0 -13
- package/dist/src/yaml/steps/render-post-processor.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/render-post-processor.test.js +0 -220
- package/dist/src/yaml/steps/script.d.ts +0 -23
- package/dist/src/yaml/steps/script.d.ts.map +0 -1
- package/dist/src/yaml/steps/script.js +0 -63
- package/dist/src/yaml/steps/spec-validation.test.d.ts +0 -6
- package/dist/src/yaml/steps/spec-validation.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/spec-validation.test.js +0 -130
- package/dist/src/yaml/steps/steps.test.d.ts +0 -6
- package/dist/src/yaml/steps/steps.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/steps.test.js +0 -881
- package/dist/src/yaml/steps/structural-facts.d.ts +0 -992
- package/dist/src/yaml/steps/structural-facts.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.js +0 -3276
- package/dist/src/yaml/steps/structural-facts.test.d.ts +0 -12
- package/dist/src/yaml/steps/structural-facts.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/structural-facts.test.js +0 -3039
- package/dist/src/yaml/steps/test-config.d.ts +0 -5
- package/dist/src/yaml/steps/test-config.d.ts.map +0 -1
- package/dist/src/yaml/steps/test-config.js +0 -25
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts +0 -28
- package/dist/src/yaml/steps/trim-align-corpus.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align-corpus.test.js +0 -383
- package/dist/src/yaml/steps/trim-align.d.ts +0 -87
- package/dist/src/yaml/steps/trim-align.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.js +0 -367
- package/dist/src/yaml/steps/trim-align.test.d.ts +0 -11
- package/dist/src/yaml/steps/trim-align.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/trim-align.test.js +0 -261
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts +0 -66
- package/dist/src/yaml/steps/ui-fidelity-preview-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.js +0 -251
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts +0 -13
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview-android.test.js +0 -302
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts +0 -134
- package/dist/src/yaml/steps/ui-fidelity-preview.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.js +0 -173
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts +0 -11
- package/dist/src/yaml/steps/ui-fidelity-preview.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-preview.test.js +0 -210
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts +0 -155
- package/dist/src/yaml/steps/ui-fidelity-render-android.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.js +0 -1389
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts +0 -2
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render-android.test.js +0 -1106
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts +0 -230
- package/dist/src/yaml/steps/ui-fidelity-render.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.js +0 -1597
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts +0 -18
- package/dist/src/yaml/steps/ui-fidelity-render.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/ui-fidelity-render.test.js +0 -1871
- package/dist/src/yaml/steps/xcode-app-product.d.ts +0 -90
- package/dist/src/yaml/steps/xcode-app-product.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.js +0 -247
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts +0 -2
- package/dist/src/yaml/steps/xcode-app-product.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-app-product.test.js +0 -202
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts +0 -30
- package/dist/src/yaml/steps/xcode-derived-data.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-derived-data.test.js +0 -279
- package/dist/src/yaml/steps/xcode-destination.d.ts +0 -47
- package/dist/src/yaml/steps/xcode-destination.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.js +0 -202
- package/dist/src/yaml/steps/xcode-destination.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-destination.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-destination.test.js +0 -227
- package/dist/src/yaml/steps/xcode-new.test.d.ts +0 -5
- package/dist/src/yaml/steps/xcode-new.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-new.test.js +0 -211
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts +0 -9
- package/dist/src/yaml/steps/xcode-resolve-retry.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-resolve-retry.test.js +0 -146
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts +0 -53
- package/dist/src/yaml/steps/xcode-simulator-archs.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.js +0 -98
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts +0 -21
- package/dist/src/yaml/steps/xcode-simulator-archs.test.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode-simulator-archs.test.js +0 -155
- package/dist/src/yaml/steps/xcode.d.ts +0 -230
- package/dist/src/yaml/steps/xcode.d.ts.map +0 -1
- package/dist/src/yaml/steps/xcode.js +0 -1350
- package/dist/src/yaml/types.d.ts +0 -76
- package/dist/src/yaml/types.d.ts.map +0 -1
- package/dist/src/yaml/types.js +0 -5
- package/dist/src/yaml/validation-types.d.ts +0 -102
- package/dist/src/yaml/validation-types.d.ts.map +0 -1
- package/dist/src/yaml/validation-types.js +0 -8
- package/dist/src/yaml/yaml-updater.d.ts +0 -24
- package/dist/src/yaml/yaml-updater.d.ts.map +0 -1
- package/dist/src/yaml/yaml-updater.js +0 -128
|
@@ -1,881 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Integration tests for step implementations
|
|
3
|
-
* Tests each step executor with sample inputs
|
|
4
|
-
*/
|
|
5
|
-
import { describe, test, expect } from '@jest/globals';
|
|
6
|
-
import { execFileSync } from 'node:child_process';
|
|
7
|
-
import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
8
|
-
import { tmpdir } from 'node:os';
|
|
9
|
-
import { join } from 'node:path';
|
|
10
|
-
import { GitCloneStepExecutor } from './git-clone.js';
|
|
11
|
-
import { ScriptStepExecutor } from './script.js';
|
|
12
|
-
import { CachePullStepExecutor, CachePushStepExecutor } from './cache.js';
|
|
13
|
-
import { testConfig, testConfigNoPeer } from './test-config.js';
|
|
14
|
-
import { XcodeBuildStepExecutor, XcodeTestStepExecutor } from './xcode.js';
|
|
15
|
-
import { SetJavaVersionStepExecutor, GradleBuildStepExecutor, AndroidLintStepExecutor, AndroidUnitTestStepExecutor, } from './android.js';
|
|
16
|
-
describe('Step Implementations', () => {
|
|
17
|
-
describe('GitCloneStepExecutor', () => {
|
|
18
|
-
test('should generate local checkout script', async () => {
|
|
19
|
-
const executor = new GitCloneStepExecutor();
|
|
20
|
-
const result = await executor.execute({}, {}, testConfig);
|
|
21
|
-
expect(result.kind).toBe('script');
|
|
22
|
-
expect(result.name).toBe('git-clone');
|
|
23
|
-
expect(result.script).toContain('git rev-parse --show-toplevel');
|
|
24
|
-
expect(result.script).toContain('CIBUILD_SOURCE_DIR');
|
|
25
|
-
expect(result.script).toContain('COMMIT_HASH');
|
|
26
|
-
});
|
|
27
|
-
test('should export commit metadata via envman', async () => {
|
|
28
|
-
const executor = new GitCloneStepExecutor();
|
|
29
|
-
const result = await executor.execute({}, {}, testConfig);
|
|
30
|
-
expect(result.script).toContain('envman add --key CIBUILD_SOURCE_DIR');
|
|
31
|
-
expect(result.script).toContain('envman add --key GIT_CLONE_COMMIT_HASH');
|
|
32
|
-
expect(result.script).toContain('envman add --key CIBUILD_GIT_COMMIT');
|
|
33
|
-
expect(result.script).toContain('envman add --key GIT_CLONE_COMMIT_AUTHOR_NAME');
|
|
34
|
-
expect(result.script).toContain('envman add --key GIT_CLONE_COMMIT_MESSAGE_SUBJECT');
|
|
35
|
-
});
|
|
36
|
-
test('should export CIBUILD variables', async () => {
|
|
37
|
-
const executor = new GitCloneStepExecutor();
|
|
38
|
-
const result = await executor.execute({}, {}, testConfig);
|
|
39
|
-
expect(result.script).toContain('envman add --key CIBUILD_SOURCE_DIR');
|
|
40
|
-
expect(result.script).toContain('envman add --key CIBUILD_GIT_COMMIT');
|
|
41
|
-
});
|
|
42
|
-
test('should fail if not in a git repository', async () => {
|
|
43
|
-
const executor = new GitCloneStepExecutor();
|
|
44
|
-
const result = await executor.execute({}, {}, testConfig);
|
|
45
|
-
expect(result.script).toContain('Not inside a git repository');
|
|
46
|
-
expect(result.script).toContain('exit 1');
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
describe('ScriptStepExecutor', () => {
|
|
50
|
-
test('should generate bash script', async () => {
|
|
51
|
-
const executor = new ScriptStepExecutor();
|
|
52
|
-
const inputs = {
|
|
53
|
-
content: 'echo "Hello World"',
|
|
54
|
-
};
|
|
55
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
56
|
-
expect(result.kind).toBe('script');
|
|
57
|
-
expect(result.name).toBe('script');
|
|
58
|
-
expect(result.script).toContain('echo "Hello World"');
|
|
59
|
-
});
|
|
60
|
-
test('should require content input', async () => {
|
|
61
|
-
const executor = new ScriptStepExecutor();
|
|
62
|
-
const inputs = {};
|
|
63
|
-
await expect(executor.execute(inputs, {}, testConfig)).rejects.toThrow("Missing required input 'content'");
|
|
64
|
-
});
|
|
65
|
-
test('should support working directory', async () => {
|
|
66
|
-
const executor = new ScriptStepExecutor();
|
|
67
|
-
const inputs = {
|
|
68
|
-
content: 'pwd',
|
|
69
|
-
working_dir: '/tmp/test',
|
|
70
|
-
};
|
|
71
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
72
|
-
expect(result.script).toContain('cd');
|
|
73
|
-
expect(result.script).toContain('/tmp/test');
|
|
74
|
-
});
|
|
75
|
-
test('should support python runner', async () => {
|
|
76
|
-
const executor = new ScriptStepExecutor();
|
|
77
|
-
const inputs = {
|
|
78
|
-
content: 'print("Hello from Python")',
|
|
79
|
-
runner_bin: 'python3',
|
|
80
|
-
};
|
|
81
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
82
|
-
expect(result.kind).toBe('python');
|
|
83
|
-
expect(result.script).toBe('print("Hello from Python")');
|
|
84
|
-
});
|
|
85
|
-
test('should support node runner', async () => {
|
|
86
|
-
const executor = new ScriptStepExecutor();
|
|
87
|
-
const inputs = {
|
|
88
|
-
content: 'console.log("Hello from Node")',
|
|
89
|
-
runner_bin: 'node',
|
|
90
|
-
};
|
|
91
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
92
|
-
expect(result.kind).toBe('node');
|
|
93
|
-
expect(result.script).toBe('console.log("Hello from Node")');
|
|
94
|
-
});
|
|
95
|
-
test('should support ruby runner', async () => {
|
|
96
|
-
const executor = new ScriptStepExecutor();
|
|
97
|
-
const inputs = {
|
|
98
|
-
content: 'puts "Hello from Ruby"',
|
|
99
|
-
runner_bin: 'ruby',
|
|
100
|
-
};
|
|
101
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
102
|
-
expect(result.kind).toBe('ruby');
|
|
103
|
-
expect(result.script).toBe('puts "Hello from Ruby"');
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
describe('CachePullStepExecutor', () => {
|
|
107
|
-
test('should generate cache pull script', async () => {
|
|
108
|
-
const executor = new CachePullStepExecutor();
|
|
109
|
-
const inputs = {
|
|
110
|
-
cache_key: 'node-modules-v1',
|
|
111
|
-
cache_paths: ['node_modules'],
|
|
112
|
-
};
|
|
113
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
114
|
-
expect(result.kind).toBe('script');
|
|
115
|
-
expect(result.name).toBe('cache-pull');
|
|
116
|
-
expect(result.script).toContain('cache-pull');
|
|
117
|
-
expect(result.script).toContain('node-modules-v1');
|
|
118
|
-
expect(result.script).toContain('.ci-cache');
|
|
119
|
-
});
|
|
120
|
-
test('should skip gracefully when cache_key is missing', async () => {
|
|
121
|
-
const executor = new CachePullStepExecutor();
|
|
122
|
-
const inputs = {};
|
|
123
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
124
|
-
expect(result.script).toContain('skipped');
|
|
125
|
-
});
|
|
126
|
-
test('should support debug mode', async () => {
|
|
127
|
-
const executor = new CachePullStepExecutor();
|
|
128
|
-
const inputs = {
|
|
129
|
-
cache_key: 'test-cache',
|
|
130
|
-
is_debug_mode: true,
|
|
131
|
-
};
|
|
132
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
133
|
-
expect(result.script).toContain('Debug mode enabled');
|
|
134
|
-
});
|
|
135
|
-
test('should auto-configure for cocoapods technology', async () => {
|
|
136
|
-
const executor = new CachePullStepExecutor();
|
|
137
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfig);
|
|
138
|
-
expect(result.script).toContain('Podfile.lock');
|
|
139
|
-
expect(result.script).toContain('pods-');
|
|
140
|
-
expect(result.script).toContain('shasum -a 256');
|
|
141
|
-
});
|
|
142
|
-
test('should auto-configure for gradle technology', async () => {
|
|
143
|
-
const executor = new CachePullStepExecutor();
|
|
144
|
-
const result = await executor.execute({ technology: 'gradle' }, {}, testConfig);
|
|
145
|
-
expect(result.script).toContain("-name 'gradle-wrapper.properties'");
|
|
146
|
-
expect(result.script).toContain("-name 'build.gradle.kts'");
|
|
147
|
-
expect(result.script).toContain('gradle-');
|
|
148
|
-
});
|
|
149
|
-
test('should auto-configure for npm technology', async () => {
|
|
150
|
-
const executor = new CachePullStepExecutor();
|
|
151
|
-
const result = await executor.execute({ technology: 'npm' }, {}, testConfig);
|
|
152
|
-
expect(result.script).toContain('package-lock.json');
|
|
153
|
-
expect(result.script).toContain('npm-');
|
|
154
|
-
});
|
|
155
|
-
test('should auto-configure for dart technology', async () => {
|
|
156
|
-
const executor = new CachePullStepExecutor();
|
|
157
|
-
const result = await executor.execute({ technology: 'dart' }, {}, testConfig);
|
|
158
|
-
expect(result.script).toContain('pubspec.lock');
|
|
159
|
-
expect(result.script).toContain('dart-');
|
|
160
|
-
});
|
|
161
|
-
test('should auto-configure for carthage technology', async () => {
|
|
162
|
-
const executor = new CachePullStepExecutor();
|
|
163
|
-
const result = await executor.execute({ technology: 'carthage' }, {}, testConfig);
|
|
164
|
-
expect(result.script).toContain('Cartfile.resolved');
|
|
165
|
-
expect(result.script).toContain('carthage-');
|
|
166
|
-
});
|
|
167
|
-
test('should auto-configure for spm technology', async () => {
|
|
168
|
-
const executor = new CachePullStepExecutor();
|
|
169
|
-
const result = await executor.execute({ technology: 'spm' }, {}, testConfig);
|
|
170
|
-
expect(result.script).toContain('Package.resolved');
|
|
171
|
-
expect(result.script).toContain('spm-');
|
|
172
|
-
});
|
|
173
|
-
// A static `toContain` check can't catch a control-flow bug in the
|
|
174
|
-
// fallback chain (the script "contains" both Podfile.lock and
|
|
175
|
-
// Package.resolved either way). So actually execute the generated
|
|
176
|
-
// key-derivation in a fixture repo and read the resolved key back.
|
|
177
|
-
describe('ios fallback chain (executed in a fixture repo)', () => {
|
|
178
|
-
// Run the generated ios cache-pull in a fixture repo and capture
|
|
179
|
-
// BOTH streams (the daemon probe writes its noise to stderr).
|
|
180
|
-
async function runIosPull(build, env = {}) {
|
|
181
|
-
const script = (await new CachePullStepExecutor().execute({ technology: 'ios' }, {}, testConfigNoPeer)).script;
|
|
182
|
-
const dir = mkdtempSync(join(tmpdir(), 'cibuild-cache-'));
|
|
183
|
-
try {
|
|
184
|
-
build(dir);
|
|
185
|
-
const scriptPath = join(dir, '__cache_pull.sh');
|
|
186
|
-
writeFileSync(scriptPath, script);
|
|
187
|
-
let stdout = '';
|
|
188
|
-
let stderr = '';
|
|
189
|
-
try {
|
|
190
|
-
stdout = execFileSync('bash', [scriptPath], {
|
|
191
|
-
cwd: dir,
|
|
192
|
-
encoding: 'utf-8',
|
|
193
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
194
|
-
env: { ...process.env, ...env },
|
|
195
|
-
timeout: 20000,
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
catch (e) {
|
|
199
|
-
const err = e;
|
|
200
|
-
stdout = String(err.stdout ?? '');
|
|
201
|
-
stderr = String(err.stderr ?? '');
|
|
202
|
-
}
|
|
203
|
-
return { stdout, stderr, combined: stdout + stderr };
|
|
204
|
-
}
|
|
205
|
-
finally {
|
|
206
|
-
rmSync(dir, { recursive: true, force: true });
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
async function resolveIosCacheKey(build) {
|
|
210
|
-
const { combined } = await runIosPull(build);
|
|
211
|
-
const m = combined.match(/CACHE_KEY=(\S+)/);
|
|
212
|
-
if (!m)
|
|
213
|
-
throw new Error(`No CACHE_KEY in output:\n${combined}`);
|
|
214
|
-
return m[1];
|
|
215
|
-
}
|
|
216
|
-
function writeSpmFixture(dir) {
|
|
217
|
-
const swiftpm = join(dir, 'App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm');
|
|
218
|
-
mkdirSync(swiftpm, { recursive: true });
|
|
219
|
-
writeFileSync(join(swiftpm, 'Package.resolved'), '{"pins":[],"version":3}');
|
|
220
|
-
}
|
|
221
|
-
test('a daemon that is not listening is named once, and leaks no raw noise', async () => {
|
|
222
|
-
// A closed port: curl errors instantly with no server handle to leak.
|
|
223
|
-
//
|
|
224
|
-
// This used to assert that the output contained no `curl:` at all —
|
|
225
|
-
// curl's stderr was silenced whatever the failure mode was, which is
|
|
226
|
-
// how a 401, a 500 and a dead daemon all came to print the same
|
|
227
|
-
// `No cache found` as an empty cache. The contract is now narrower: a
|
|
228
|
-
// *miss* is silent (the 404 case, covered against a real listener in
|
|
229
|
-
// cache-pull-daemon.test.ts), a *failure* is named exactly once, and
|
|
230
|
-
// neither leaks the raw pipeline chatter that made the old blanket
|
|
231
|
-
// silence attractive in the first place.
|
|
232
|
-
const { stdout, stderr, combined } = await runIosPull(writeSpmFixture, {
|
|
233
|
-
CIBUILD_CACHE_DAEMON: 'http://127.0.0.1:1',
|
|
234
|
-
});
|
|
235
|
-
expect(stdout).toContain('Warning: cache-pull could not restore');
|
|
236
|
-
expect(stdout).toMatch(/Failed to connect|Couldn't connect|Connection refused/);
|
|
237
|
-
// Once, not once per request the step happens to make.
|
|
238
|
-
expect(stdout.match(/Warning: cache-pull could not restore/gu)).toHaveLength(1);
|
|
239
|
-
// Whatever curl said arrives inside that one line, on stdout. Nothing
|
|
240
|
-
// reaches the build log as loose interleaved stderr, and zstd/tar still
|
|
241
|
-
// do not editorialise about a stream that never arrived.
|
|
242
|
-
expect(stderr).not.toContain('curl:');
|
|
243
|
-
expect(combined).not.toContain('unexpected end of file');
|
|
244
|
-
// Still resolves the SPM key and reports a cold miss.
|
|
245
|
-
expect(stdout).toContain('CACHE_SOURCE=cold');
|
|
246
|
-
expect(stdout).toMatch(/CACHE_KEY=spm-/);
|
|
247
|
-
});
|
|
248
|
-
test('SPM project (Package.resolved, no Podfile.lock) resolves an spm- key', async () => {
|
|
249
|
-
const key = await resolveIosCacheKey((dir) => {
|
|
250
|
-
// Real Xcode SPM location — Package.resolved committed under
|
|
251
|
-
// the shared xcworkspace data, no Podfile.lock anywhere.
|
|
252
|
-
const swiftpm = join(dir, 'App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm');
|
|
253
|
-
mkdirSync(swiftpm, { recursive: true });
|
|
254
|
-
writeFileSync(join(swiftpm, 'Package.resolved'), '{"pins":[],"version":3}');
|
|
255
|
-
});
|
|
256
|
-
expect(key).toMatch(/^spm-/);
|
|
257
|
-
expect(key).not.toContain('no-lockfile');
|
|
258
|
-
});
|
|
259
|
-
test('CocoaPods project (Podfile.lock) resolves a pods- key', async () => {
|
|
260
|
-
const key = await resolveIosCacheKey((dir) => {
|
|
261
|
-
writeFileSync(join(dir, 'Podfile.lock'), 'PODS:\n - Alamofire\n');
|
|
262
|
-
});
|
|
263
|
-
expect(key).toMatch(/^pods-/);
|
|
264
|
-
expect(key).not.toContain('no-lockfile');
|
|
265
|
-
});
|
|
266
|
-
test('Podfile.lock wins over Package.resolved when both exist', async () => {
|
|
267
|
-
const key = await resolveIosCacheKey((dir) => {
|
|
268
|
-
writeFileSync(join(dir, 'Podfile.lock'), 'PODS:\n');
|
|
269
|
-
writeFileSync(join(dir, 'Package.resolved'), '{"pins":[]}');
|
|
270
|
-
});
|
|
271
|
-
expect(key).toMatch(/^pods-/);
|
|
272
|
-
expect(key).not.toContain('no-lockfile');
|
|
273
|
-
});
|
|
274
|
-
test('neither lockfile present falls back to a no-lockfile key', async () => {
|
|
275
|
-
const key = await resolveIosCacheKey(() => { });
|
|
276
|
-
expect(key).toContain('no-lockfile');
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
test('should auto-configure for yarn technology', async () => {
|
|
280
|
-
const executor = new CachePullStepExecutor();
|
|
281
|
-
const result = await executor.execute({ technology: 'yarn' }, {}, testConfig);
|
|
282
|
-
expect(result.script).toContain('yarn.lock');
|
|
283
|
-
expect(result.script).toContain('yarn-');
|
|
284
|
-
});
|
|
285
|
-
test('should auto-configure for kmm technology', async () => {
|
|
286
|
-
const executor = new CachePullStepExecutor();
|
|
287
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
288
|
-
expect(result.script).toContain("-name 'gradle-wrapper.properties'");
|
|
289
|
-
expect(result.script).toContain("-name 'settings.gradle'");
|
|
290
|
-
expect(result.script).toContain("-name 'build.gradle.kts'");
|
|
291
|
-
expect(result.script).toContain("-name 'libs.versions.toml'");
|
|
292
|
-
expect(result.script).toContain('kmm-');
|
|
293
|
-
});
|
|
294
|
-
test('should use zstd compression format', async () => {
|
|
295
|
-
const executor = new CachePullStepExecutor();
|
|
296
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfig);
|
|
297
|
-
expect(result.script).toContain('.tar.zst');
|
|
298
|
-
expect(result.script).toContain('zstd -dc');
|
|
299
|
-
expect(result.script).not.toContain('.tar.gz');
|
|
300
|
-
expect(result.script).not.toContain('tar -xzf');
|
|
301
|
-
});
|
|
302
|
-
test('should throw on unknown technology', async () => {
|
|
303
|
-
const executor = new CachePullStepExecutor();
|
|
304
|
-
await expect(executor.execute({ technology: 'unknown' }, {}, testConfig)).rejects.toThrow("Unknown cache technology 'unknown'");
|
|
305
|
-
});
|
|
306
|
-
test('should include peer cache fallback when peerCacheDir is set', async () => {
|
|
307
|
-
const executor = new CachePullStepExecutor();
|
|
308
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfig);
|
|
309
|
-
expect(result.script).toContain('PEER_CACHE_DIR=');
|
|
310
|
-
expect(result.script).toContain('PEER_CACHE_FILE=');
|
|
311
|
-
expect(result.script).toContain('CACHE_SOURCE=local');
|
|
312
|
-
expect(result.script).toContain('CACHE_SOURCE=peer');
|
|
313
|
-
expect(result.script).toContain('CACHE_SOURCE=cold');
|
|
314
|
-
// tee pattern: single read from peer, simultaneous extract + local warm
|
|
315
|
-
expect(result.script).toContain('tee "$CACHE_FILE.tmp" < "$PEER_CACHE_FILE"');
|
|
316
|
-
});
|
|
317
|
-
test('should skip peer fallback when peerCacheDir is not set', async () => {
|
|
318
|
-
const executor = new CachePullStepExecutor();
|
|
319
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfigNoPeer);
|
|
320
|
-
expect(result.script).not.toContain('PEER_CACHE_DIR=');
|
|
321
|
-
expect(result.script).not.toContain('PEER_CACHE_FILE=');
|
|
322
|
-
expect(result.script).not.toContain('CACHE_SOURCE=peer');
|
|
323
|
-
});
|
|
324
|
-
test('should include peer fallback for manual cache_key pull', async () => {
|
|
325
|
-
const executor = new CachePullStepExecutor();
|
|
326
|
-
const result = await executor.execute({ cache_key: 'my-key' }, {}, testConfig);
|
|
327
|
-
expect(result.script).toContain('PEER_CACHE_DIR=');
|
|
328
|
-
expect(result.script).toContain('CACHE_SOURCE=peer');
|
|
329
|
-
expect(result.script).toContain('tee "$CACHE_FILE.tmp" < "$PEER_CACHE_FILE"');
|
|
330
|
-
});
|
|
331
|
-
test('should fall back to newest prior tarball scoped to <keyPrefix>-<projectId> on exact-key miss', async () => {
|
|
332
|
-
const executor = new CachePullStepExecutor();
|
|
333
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
334
|
-
// Scope = everything before the last dash (prefix+projectId, not just prefix),
|
|
335
|
-
// so fallback cannot cross-contaminate between different projects
|
|
336
|
-
expect(result.script).toContain('__ci_fb_scope="${CACHE_KEY%-*}"');
|
|
337
|
-
expect(result.script).toContain('ls -t "$CACHE_DIR"/"$__ci_fb_scope"-*.tar.zst');
|
|
338
|
-
expect(result.script).toContain('CACHE_SOURCE=fallback_');
|
|
339
|
-
expect(result.script).toContain('FALLBACK_KEY=');
|
|
340
|
-
// Fallback must NOT warm $CACHE_FILE (otherwise cache-push would skip).
|
|
341
|
-
// Both transports declare a scope, so anchor on the last one — the
|
|
342
|
-
// filesystem branch, which is the only one with a $CACHE_FILE to warm.
|
|
343
|
-
const sections = result.script.split('__ci_fb_scope=');
|
|
344
|
-
const fallbackSection = sections[sections.length - 1] ?? '';
|
|
345
|
-
expect(fallbackSection).not.toContain('mv "$CACHE_FILE.tmp" "$CACHE_FILE"');
|
|
346
|
-
});
|
|
347
|
-
test('asks the daemon for the scope fallback, dated, when there is no shared dir', async () => {
|
|
348
|
-
const executor = new CachePullStepExecutor();
|
|
349
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
350
|
-
// The daemon answers the same two questions the directory listing did:
|
|
351
|
-
// which key, and how old.
|
|
352
|
-
expect(result.script).toContain('"$CIBUILD_CACHE_DAEMON/cache/scope/$__ci_fb_scope/latest"');
|
|
353
|
-
expect(result.script).toContain('CACHE_SOURCE=fallback_daemon');
|
|
354
|
-
// The 30-day cap has to survive losing `stat`, so it reads the daemon's
|
|
355
|
-
// mtime instead. Without this the cap silently disappears.
|
|
356
|
-
expect(result.script).toContain('__ci_fb_mtime');
|
|
357
|
-
expect(result.script).toContain('-le 30');
|
|
358
|
-
expect(result.script).toContain('FALLBACK_REJECTED=');
|
|
359
|
-
});
|
|
360
|
-
test('should try peer dir for fallback when local has no prior tarball', async () => {
|
|
361
|
-
const executor = new CachePullStepExecutor();
|
|
362
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
363
|
-
expect(result.script).toContain('ls -t "$PEER_CACHE_DIR"/"$__ci_fb_scope"-*.tar.zst');
|
|
364
|
-
expect(result.script).toContain('__ci_fb_src=peer');
|
|
365
|
-
});
|
|
366
|
-
test('should skip peer fallback branch when peerCacheDir is not set', async () => {
|
|
367
|
-
const executor = new CachePullStepExecutor();
|
|
368
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfigNoPeer);
|
|
369
|
-
expect(result.script).not.toContain('ls -t "$PEER_CACHE_DIR"');
|
|
370
|
-
// Local fallback still available
|
|
371
|
-
expect(result.script).toContain('ls -t "$CACHE_DIR"/"$__ci_fb_scope"-*.tar.zst');
|
|
372
|
-
});
|
|
373
|
-
test('should include project-scope id ($__ci_proj) in cache key', async () => {
|
|
374
|
-
const executor = new CachePullStepExecutor();
|
|
375
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
376
|
-
// Project id derived from stripped git remote URL, 8-char hash
|
|
377
|
-
expect(result.script).toContain('git config --get remote.origin.url');
|
|
378
|
-
expect(result.script).toContain('__ci_proj=$');
|
|
379
|
-
// Key format: <prefix>-<projid>-<fp>
|
|
380
|
-
expect(result.script).toContain('CACHE_KEY="kmm-${__ci_proj}-${CHECKSUM}"');
|
|
381
|
-
});
|
|
382
|
-
test('should include project-scope id in lockfile-based preset keys', async () => {
|
|
383
|
-
const executor = new CachePullStepExecutor();
|
|
384
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfig);
|
|
385
|
-
expect(result.script).toContain('__ci_proj=$');
|
|
386
|
-
expect(result.script).toContain('CACHE_KEY="pods-${__ci_proj}-${CHECKSUM}"');
|
|
387
|
-
});
|
|
388
|
-
test('should enforce 30-day age cap on fallback, going cold when older', async () => {
|
|
389
|
-
const executor = new CachePullStepExecutor();
|
|
390
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
391
|
-
// Computes age in days from stat mtime, rejects if over 30
|
|
392
|
-
expect(result.script).toContain('__ci_fb_age_days=$(( ($(date +%s) - $(stat -f %m "$__ci_fb")) / 86400 ))');
|
|
393
|
-
expect(result.script).toContain('if [ "$__ci_fb_age_days" -le 30 ]');
|
|
394
|
-
expect(result.script).toContain('exceeds 30d cap — going cold');
|
|
395
|
-
expect(result.script).toContain('FALLBACK_REJECTED=');
|
|
396
|
-
});
|
|
397
|
-
test('routes a preset pull miss through the cache daemon when CIBUILD_CACHE_DAEMON is set', async () => {
|
|
398
|
-
const executor = new CachePullStepExecutor();
|
|
399
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
400
|
-
// Daemon branch is gated at runtime on the injected env var (so the same
|
|
401
|
-
// generated script is a no-op when the runner doesn't inject a daemon).
|
|
402
|
-
expect(result.script).toContain('[ -n "$CIBUILD_CACHE_DAEMON" ]');
|
|
403
|
-
// Exact-key GET against the per-runner daemon.
|
|
404
|
-
expect(result.script).toContain('"$CIBUILD_CACHE_DAEMON/cache/$CACHE_KEY.tar.zst"');
|
|
405
|
-
// Stream-extract: the daemon already persisted the tarball to ~/cache via
|
|
406
|
-
// resolveMiss, so we pipe straight to extraction with no redundant write.
|
|
407
|
-
expect(result.script).toContain('CACHE_SOURCE=daemon CACHE_KEY=$CACHE_KEY');
|
|
408
|
-
});
|
|
409
|
-
test('sends the per-build bearer token only when CIBUILD_CACHE_TOKEN is set', async () => {
|
|
410
|
-
const executor = new CachePullStepExecutor();
|
|
411
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
412
|
-
// ${VAR:+...} expands the -H flag only when the token is non-empty, so an
|
|
413
|
-
// unauthenticated daemon isn't sent a bogus "Bearer " header.
|
|
414
|
-
expect(result.script).toContain('${CIBUILD_CACHE_TOKEN:+-H "Authorization: Bearer $CIBUILD_CACHE_TOKEN"}');
|
|
415
|
-
});
|
|
416
|
-
test('picks its transport up front — daemon when configured, directory otherwise', async () => {
|
|
417
|
-
const executor = new CachePullStepExecutor();
|
|
418
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
419
|
-
// The daemon is no longer a branch *within* the directory search; it is
|
|
420
|
-
// the alternative to it, chosen before any lookup happens. A runner has
|
|
421
|
-
// no cache directory to search once the mount is gone, and standalone
|
|
422
|
-
// cibuild has no daemon — the same script has to serve both.
|
|
423
|
-
const splitAt = result.script.indexOf('if [ -n "$CIBUILD_CACHE_DAEMON" ]; then');
|
|
424
|
-
const daemonAt = result.script.indexOf('CACHE_SOURCE=daemon');
|
|
425
|
-
const localAt = result.script.indexOf('CACHE_SOURCE=local');
|
|
426
|
-
expect(splitAt).toBeGreaterThanOrEqual(0);
|
|
427
|
-
expect(daemonAt).toBeGreaterThan(splitAt);
|
|
428
|
-
expect(localAt).toBeGreaterThan(daemonAt);
|
|
429
|
-
});
|
|
430
|
-
test('does not require the cache directory to exist when using the daemon', async () => {
|
|
431
|
-
const executor = new CachePullStepExecutor();
|
|
432
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
433
|
-
// An unconditional mkdir aborts the step under errexit once the mount is
|
|
434
|
-
// gone, which is how this fails in production rather than in a test.
|
|
435
|
-
expect(result.script).toContain('[ -n "$CIBUILD_CACHE_DAEMON" ] || mkdir -p "$CACHE_DIR"');
|
|
436
|
-
expect(result.script).not.toContain('\nmkdir -p "$CACHE_DIR"');
|
|
437
|
-
});
|
|
438
|
-
test('routes a manual cache_key pull miss through the cache daemon', async () => {
|
|
439
|
-
const executor = new CachePullStepExecutor();
|
|
440
|
-
const result = await executor.execute({ cache_key: 'my-key' }, {}, testConfig);
|
|
441
|
-
expect(result.script).toContain('[ -n "$CIBUILD_CACHE_DAEMON" ]');
|
|
442
|
-
expect(result.script).toContain('"$CIBUILD_CACHE_DAEMON/cache/$CACHE_KEY.tar.zst"');
|
|
443
|
-
// An explicit-key step reports the bare source, matching its sibling
|
|
444
|
-
// markers; the key is already fixed and echoed by the step header.
|
|
445
|
-
expect(result.script).toContain('CACHE_SOURCE=daemon');
|
|
446
|
-
});
|
|
447
|
-
});
|
|
448
|
-
describe('CachePushStepExecutor', () => {
|
|
449
|
-
test('should generate cache push script', async () => {
|
|
450
|
-
const executor = new CachePushStepExecutor();
|
|
451
|
-
const inputs = {
|
|
452
|
-
cache_key: 'node-modules-v1',
|
|
453
|
-
cache_paths: ['node_modules', '.gradle'],
|
|
454
|
-
};
|
|
455
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
456
|
-
expect(result.kind).toBe('script');
|
|
457
|
-
expect(result.name).toBe('cache-push');
|
|
458
|
-
expect(result.script).toContain('cache-push');
|
|
459
|
-
expect(result.script).toContain('node-modules-v1');
|
|
460
|
-
expect(result.script).toContain('.ci-cache');
|
|
461
|
-
});
|
|
462
|
-
test('uploads to the daemon when one is configured, on both step forms', async () => {
|
|
463
|
-
const executor = new CachePushStepExecutor();
|
|
464
|
-
const manual = await executor.execute({ cache_key: 'my-key', cache_paths: ['build'] }, {}, testConfig);
|
|
465
|
-
const preset = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
466
|
-
// This is the half that used to be missing: push wrote only to the
|
|
467
|
-
// shared directory, so removing the mount would have silently dropped
|
|
468
|
-
// every cache while still reporting success.
|
|
469
|
-
for (const result of [manual, preset]) {
|
|
470
|
-
expect(result.script).toContain('-T - "$CIBUILD_CACHE_DAEMON/cache/$CACHE_KEY.tar.zst"');
|
|
471
|
-
expect(result.script).toContain('${CIBUILD_CACHE_TOKEN:+-H "Authorization: Bearer $CIBUILD_CACHE_TOKEN"}');
|
|
472
|
-
// Streamed straight out — nothing is staged on the guest, so there is
|
|
473
|
-
// no temp file to collide with a concurrent slot or orphan on failure.
|
|
474
|
-
expect(result.script).toContain('| zstd -3 | curl');
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
test('a failed upload warns instead of failing the build', async () => {
|
|
478
|
-
const executor = new CachePushStepExecutor();
|
|
479
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
480
|
-
expect(result.script).toContain('Warning: failed to upload cache to the daemon');
|
|
481
|
-
});
|
|
482
|
-
test('still writes to the cache directory when no daemon is configured', async () => {
|
|
483
|
-
const executor = new CachePushStepExecutor();
|
|
484
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
485
|
-
// Standalone cibuild has no daemon and must keep working unchanged.
|
|
486
|
-
expect(result.script).toContain('CACHE_TMP="$CACHE_FILE.$$.$RANDOM.tmp"');
|
|
487
|
-
expect(result.script).toContain('mv "$CACHE_TMP" "$CACHE_FILE"');
|
|
488
|
-
});
|
|
489
|
-
test('should skip gracefully when cache_key is missing', async () => {
|
|
490
|
-
const executor = new CachePushStepExecutor();
|
|
491
|
-
const inputs = {
|
|
492
|
-
cache_paths: ['node_modules'],
|
|
493
|
-
};
|
|
494
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
495
|
-
expect(result.script).toContain('skipped');
|
|
496
|
-
});
|
|
497
|
-
test('uses a per-process-unique temp for the atomic write (CBR-12)', async () => {
|
|
498
|
-
const executor = new CachePushStepExecutor();
|
|
499
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
500
|
-
// The old fixed "$CACHE_FILE.tmp" assumed a single writer ("runs
|
|
501
|
-
// serialized per runner") — false with two VM slots, and it collides with
|
|
502
|
-
// the host cache daemon mutating the same VirtioFS-shared dir. A unique
|
|
503
|
-
// temp (PID + $RANDOM) removes the collision; the atomic mv is preserved.
|
|
504
|
-
expect(result.script).not.toContain('> "$CACHE_FILE.tmp"');
|
|
505
|
-
expect(result.script).toContain('CACHE_TMP="$CACHE_FILE.$$.$RANDOM.tmp"');
|
|
506
|
-
expect(result.script).toContain('mv "$CACHE_TMP" "$CACHE_FILE"');
|
|
507
|
-
// A failed compress/mv cleans its own temp instead of leaking orphans,
|
|
508
|
-
// and stays non-fatal (never fails the build).
|
|
509
|
-
expect(result.script).toContain('rm -f "$CACHE_TMP"');
|
|
510
|
-
});
|
|
511
|
-
test('should require cache_paths', async () => {
|
|
512
|
-
const executor = new CachePushStepExecutor();
|
|
513
|
-
const inputs = {
|
|
514
|
-
cache_key: 'test-cache',
|
|
515
|
-
cache_paths: [],
|
|
516
|
-
};
|
|
517
|
-
await expect(executor.execute(inputs, {}, testConfig)).rejects.toThrow("Missing or empty 'cache_paths'");
|
|
518
|
-
});
|
|
519
|
-
test('should support debug mode', async () => {
|
|
520
|
-
const executor = new CachePushStepExecutor();
|
|
521
|
-
const inputs = {
|
|
522
|
-
cache_key: 'test-cache',
|
|
523
|
-
cache_paths: ['build'],
|
|
524
|
-
is_debug_mode: true,
|
|
525
|
-
};
|
|
526
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
527
|
-
expect(result.script).toContain('Debug mode enabled');
|
|
528
|
-
});
|
|
529
|
-
test('should auto-configure for cocoapods technology', async () => {
|
|
530
|
-
const executor = new CachePushStepExecutor();
|
|
531
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfig);
|
|
532
|
-
expect(result.script).toContain('Podfile.lock');
|
|
533
|
-
expect(result.script).toContain('pods-');
|
|
534
|
-
expect(result.script).toContain('Pods');
|
|
535
|
-
expect(result.script).toContain('zstd -3');
|
|
536
|
-
});
|
|
537
|
-
test('should auto-configure for gradle technology', async () => {
|
|
538
|
-
const executor = new CachePushStepExecutor();
|
|
539
|
-
const result = await executor.execute({ technology: 'gradle' }, {}, testConfig);
|
|
540
|
-
expect(result.script).toContain("-name 'gradle-wrapper.properties'");
|
|
541
|
-
expect(result.script).toContain("-name 'build.gradle.kts'");
|
|
542
|
-
expect(result.script).toContain('~/.gradle/caches');
|
|
543
|
-
});
|
|
544
|
-
test('should auto-configure for npm technology', async () => {
|
|
545
|
-
const executor = new CachePushStepExecutor();
|
|
546
|
-
const result = await executor.execute({ technology: 'npm' }, {}, testConfig);
|
|
547
|
-
expect(result.script).toContain('package-lock.json');
|
|
548
|
-
expect(result.script).toContain('node_modules');
|
|
549
|
-
});
|
|
550
|
-
test('should auto-configure for dart technology', async () => {
|
|
551
|
-
const executor = new CachePushStepExecutor();
|
|
552
|
-
const result = await executor.execute({ technology: 'dart' }, {}, testConfig);
|
|
553
|
-
expect(result.script).toContain('pubspec.lock');
|
|
554
|
-
expect(result.script).toContain('.dart_tool');
|
|
555
|
-
expect(result.script).toContain('.pub-cache');
|
|
556
|
-
});
|
|
557
|
-
test('should auto-configure for kmm technology', async () => {
|
|
558
|
-
const executor = new CachePushStepExecutor();
|
|
559
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
560
|
-
expect(result.script).toContain("-name 'gradle-wrapper.properties'");
|
|
561
|
-
expect(result.script).toContain("-name 'settings.gradle.kts'");
|
|
562
|
-
expect(result.script).toContain("-name 'libs.versions.toml'");
|
|
563
|
-
expect(result.script).toContain('kmm-');
|
|
564
|
-
expect(result.script).toContain('~/.gradle/caches');
|
|
565
|
-
expect(result.script).toContain('~/.gradle/wrapper/dists');
|
|
566
|
-
expect(result.script).toContain('~/.konan');
|
|
567
|
-
});
|
|
568
|
-
test('should use zstd compression format', async () => {
|
|
569
|
-
const executor = new CachePushStepExecutor();
|
|
570
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfig);
|
|
571
|
-
expect(result.script).toContain('.tar.zst');
|
|
572
|
-
expect(result.script).toContain('zstd -3');
|
|
573
|
-
expect(result.script).not.toContain('.tar.gz');
|
|
574
|
-
expect(result.script).not.toContain('tar -czf');
|
|
575
|
-
});
|
|
576
|
-
test('should throw on unknown technology', async () => {
|
|
577
|
-
const executor = new CachePushStepExecutor();
|
|
578
|
-
await expect(executor.execute({ technology: 'unknown' }, {}, testConfig)).rejects.toThrow("Unknown cache technology 'unknown'");
|
|
579
|
-
});
|
|
580
|
-
test('should not use shlock (flaky on virtiofs cache mount) for preset push', async () => {
|
|
581
|
-
const executor = new CachePushStepExecutor();
|
|
582
|
-
const result = await executor.execute({ technology: 'cocoapods' }, {}, testConfig);
|
|
583
|
-
expect(result.script).not.toContain('shlock');
|
|
584
|
-
expect(result.script).not.toContain('LOCK_FILE');
|
|
585
|
-
expect(result.script).not.toContain('__ci_lock_tries');
|
|
586
|
-
});
|
|
587
|
-
test('should not use shlock for manual cache_key push', async () => {
|
|
588
|
-
const executor = new CachePushStepExecutor();
|
|
589
|
-
const result = await executor.execute({ cache_key: 'my-key', cache_paths: ['build'] }, {}, testConfig);
|
|
590
|
-
expect(result.script).not.toContain('shlock');
|
|
591
|
-
expect(result.script).not.toContain('LOCK_FILE');
|
|
592
|
-
});
|
|
593
|
-
test('should use atomic write (tmp + mv) for preset push', async () => {
|
|
594
|
-
const executor = new CachePushStepExecutor();
|
|
595
|
-
const result = await executor.execute({ technology: 'gradle' }, {}, testConfig);
|
|
596
|
-
expect(result.script).toContain('> "$CACHE_TMP"');
|
|
597
|
-
expect(result.script).toContain('mv "$CACHE_TMP" "$CACHE_FILE"');
|
|
598
|
-
});
|
|
599
|
-
test('should NOT emit guest-side retention (the peer cache daemon owns it, CBR-6)', async () => {
|
|
600
|
-
// ADR 0002 / CBR-6: retention moved into the long-lived peer cache daemon,
|
|
601
|
-
// which knows (via the manager) which scopes this runner owns and must never
|
|
602
|
-
// evict. The guest cache-push no longer prunes — it could only reap an owner's
|
|
603
|
-
// durable copy, having no ownership knowledge of its own.
|
|
604
|
-
const executor = new CachePushStepExecutor();
|
|
605
|
-
const result = await executor.execute({ technology: 'kmm' }, {}, testConfig);
|
|
606
|
-
expect(result.script).not.toContain('__ci_ret_scope');
|
|
607
|
-
expect(result.script).not.toContain('__ci_ret_count_cap');
|
|
608
|
-
expect(result.script).not.toContain('__ci_ret_age_cap');
|
|
609
|
-
expect(result.script).not.toContain('CIBUILD_CACHE_SCOPE_BUDGET_KB');
|
|
610
|
-
// The successful-push path itself is unchanged.
|
|
611
|
-
expect(result.script).toContain('Cache created successfully');
|
|
612
|
-
});
|
|
613
|
-
test('should not emit retention for a manual cache_key push either', async () => {
|
|
614
|
-
const executor = new CachePushStepExecutor();
|
|
615
|
-
const result = await executor.execute({ cache_key: 'my-key', cache_paths: ['build'] }, {}, testConfig);
|
|
616
|
-
expect(result.script).not.toContain('__ci_ret_scope');
|
|
617
|
-
expect(result.script).not.toContain('__ci_ret_count_cap');
|
|
618
|
-
});
|
|
619
|
-
test('should use atomic write (tmp + mv) for manual cache_key push', async () => {
|
|
620
|
-
const executor = new CachePushStepExecutor();
|
|
621
|
-
const result = await executor.execute({ cache_key: 'my-key', cache_paths: ['build'] }, {}, testConfig);
|
|
622
|
-
expect(result.script).toContain('> "$CACHE_TMP"');
|
|
623
|
-
expect(result.script).toContain('mv "$CACHE_TMP" "$CACHE_FILE"');
|
|
624
|
-
});
|
|
625
|
-
});
|
|
626
|
-
describe('XcodeBuildStepExecutor', () => {
|
|
627
|
-
test('should generate xcodebuild script', async () => {
|
|
628
|
-
const executor = new XcodeBuildStepExecutor();
|
|
629
|
-
const inputs = {
|
|
630
|
-
project_path: 'MyApp.xcodeproj',
|
|
631
|
-
scheme: 'MyApp',
|
|
632
|
-
configuration: 'Release',
|
|
633
|
-
};
|
|
634
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
635
|
-
expect(result.kind).toBe('script');
|
|
636
|
-
expect(result.name).toBe('xcodebuild');
|
|
637
|
-
expect(result.script).toContain('xcodebuild');
|
|
638
|
-
expect(result.script).toContain('MyApp.xcodeproj');
|
|
639
|
-
expect(result.script).toContain('-scheme');
|
|
640
|
-
expect(result.script).toContain('MyApp');
|
|
641
|
-
expect(result.script).toContain('-configuration');
|
|
642
|
-
expect(result.script).toContain('Release');
|
|
643
|
-
});
|
|
644
|
-
test('should require project_path', async () => {
|
|
645
|
-
const executor = new XcodeBuildStepExecutor();
|
|
646
|
-
const inputs = {
|
|
647
|
-
scheme: 'MyApp',
|
|
648
|
-
};
|
|
649
|
-
await expect(executor.execute(inputs, {}, testConfig)).rejects.toThrow("Missing required input 'project_path'");
|
|
650
|
-
});
|
|
651
|
-
test('should require scheme', async () => {
|
|
652
|
-
const executor = new XcodeBuildStepExecutor();
|
|
653
|
-
const inputs = {
|
|
654
|
-
project_path: 'MyApp.xcodeproj',
|
|
655
|
-
};
|
|
656
|
-
await expect(executor.execute(inputs, {}, testConfig)).rejects.toThrow("Missing required input 'scheme'");
|
|
657
|
-
});
|
|
658
|
-
test('should support workspace files', async () => {
|
|
659
|
-
const executor = new XcodeBuildStepExecutor();
|
|
660
|
-
const inputs = {
|
|
661
|
-
project_path: 'MyApp.xcworkspace',
|
|
662
|
-
scheme: 'MyApp',
|
|
663
|
-
};
|
|
664
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
665
|
-
expect(result.script).toContain('xcworkspace');
|
|
666
|
-
});
|
|
667
|
-
test('should support clean build', async () => {
|
|
668
|
-
const executor = new XcodeBuildStepExecutor();
|
|
669
|
-
const inputs = {
|
|
670
|
-
project_path: 'MyApp.xcodeproj',
|
|
671
|
-
scheme: 'MyApp',
|
|
672
|
-
is_clean_build: true,
|
|
673
|
-
};
|
|
674
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
675
|
-
expect(result.script).toContain('clean');
|
|
676
|
-
});
|
|
677
|
-
});
|
|
678
|
-
describe('XcodeTestStepExecutor', () => {
|
|
679
|
-
test('should generate xcode test script', async () => {
|
|
680
|
-
const executor = new XcodeTestStepExecutor();
|
|
681
|
-
const inputs = {
|
|
682
|
-
project_path: 'MyApp.xcodeproj',
|
|
683
|
-
scheme: 'MyApp',
|
|
684
|
-
};
|
|
685
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
686
|
-
expect(result.kind).toBe('script');
|
|
687
|
-
expect(result.name).toBe('xcode-test');
|
|
688
|
-
expect(result.script).toContain('xcodebuild test');
|
|
689
|
-
expect(result.script).toContain('MyApp.xcodeproj');
|
|
690
|
-
});
|
|
691
|
-
test('should support code coverage', async () => {
|
|
692
|
-
const executor = new XcodeTestStepExecutor();
|
|
693
|
-
const inputs = {
|
|
694
|
-
project_path: 'MyApp.xcodeproj',
|
|
695
|
-
scheme: 'MyApp',
|
|
696
|
-
is_code_coverage_enabled: true,
|
|
697
|
-
};
|
|
698
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
699
|
-
expect(result.script).toContain('enableCodeCoverage YES');
|
|
700
|
-
});
|
|
701
|
-
test('should support test plan', async () => {
|
|
702
|
-
const executor = new XcodeTestStepExecutor();
|
|
703
|
-
const inputs = {
|
|
704
|
-
project_path: 'MyApp.xcodeproj',
|
|
705
|
-
scheme: 'MyApp',
|
|
706
|
-
test_plan: 'MyTestPlan',
|
|
707
|
-
};
|
|
708
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
709
|
-
expect(result.script).toContain('-testPlan');
|
|
710
|
-
expect(result.script).toContain('MyTestPlan');
|
|
711
|
-
});
|
|
712
|
-
});
|
|
713
|
-
describe('SetJavaVersionStepExecutor', () => {
|
|
714
|
-
test('should generate java version script', async () => {
|
|
715
|
-
const executor = new SetJavaVersionStepExecutor();
|
|
716
|
-
const inputs = {
|
|
717
|
-
java_version: '17',
|
|
718
|
-
};
|
|
719
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
720
|
-
expect(result.kind).toBe('script');
|
|
721
|
-
expect(result.name).toBe('set-java-version');
|
|
722
|
-
expect(result.script).toContain('JAVA_HOME');
|
|
723
|
-
expect(result.script).toContain('17');
|
|
724
|
-
});
|
|
725
|
-
test('should default to Java 17', async () => {
|
|
726
|
-
const executor = new SetJavaVersionStepExecutor();
|
|
727
|
-
const inputs = {};
|
|
728
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
729
|
-
expect(result.script).toContain('17');
|
|
730
|
-
});
|
|
731
|
-
test('should support different Java versions', async () => {
|
|
732
|
-
const executor = new SetJavaVersionStepExecutor();
|
|
733
|
-
const inputs = {
|
|
734
|
-
java_version: '11',
|
|
735
|
-
};
|
|
736
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
737
|
-
expect(result.script).toContain('11');
|
|
738
|
-
});
|
|
739
|
-
// The generated script ends in `exit 1` when it cannot find the JDK, so a
|
|
740
|
-
// missing one is not information — it is the build, already lost. Reported
|
|
741
|
-
// as info it let the run proceed and die at the very next step.
|
|
742
|
-
test('missing JDK is a pre-execution error, not an info note', () => {
|
|
743
|
-
const executor = new SetJavaVersionStepExecutor();
|
|
744
|
-
const [requirement] = executor.getValidationRequirements({ java_version: '23' }, {}, testConfig);
|
|
745
|
-
expect(requirement.severity).toBe('error');
|
|
746
|
-
expect(requirement.timing).toBe('pre-execution');
|
|
747
|
-
});
|
|
748
|
-
// GitHub Actions publishes preinstalled JDKs as JAVA_HOME_<ver>_X64 and
|
|
749
|
-
// the step reads it; a check that did not would fail a build the step
|
|
750
|
-
// would have run.
|
|
751
|
-
test('finds a JDK GitHub Actions published, as the step does', async () => {
|
|
752
|
-
const executor = new SetJavaVersionStepExecutor();
|
|
753
|
-
// A version no developer machine has, so the Homebrew and java_home
|
|
754
|
-
// branches cannot answer first and the Actions branch is what is tested.
|
|
755
|
-
const key = 'JAVA_HOME_99_X64';
|
|
756
|
-
const previous = process.env[key];
|
|
757
|
-
process.env[key] = process.cwd();
|
|
758
|
-
try {
|
|
759
|
-
const [requirement] = executor.getValidationRequirements({ java_version: '99' }, {}, testConfig);
|
|
760
|
-
const result = await requirement.check();
|
|
761
|
-
expect(result.passed).toBe(true);
|
|
762
|
-
expect(result.message).toContain('GitHub Actions');
|
|
763
|
-
}
|
|
764
|
-
finally {
|
|
765
|
-
if (previous === undefined)
|
|
766
|
-
delete process.env[key];
|
|
767
|
-
else
|
|
768
|
-
process.env[key] = previous;
|
|
769
|
-
}
|
|
770
|
-
});
|
|
771
|
-
});
|
|
772
|
-
describe('GradleBuildStepExecutor', () => {
|
|
773
|
-
test('should generate gradle build script', async () => {
|
|
774
|
-
const executor = new GradleBuildStepExecutor();
|
|
775
|
-
const inputs = {
|
|
776
|
-
project_location: '.',
|
|
777
|
-
build_type: 'Release',
|
|
778
|
-
};
|
|
779
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
780
|
-
expect(result.kind).toBe('script');
|
|
781
|
-
expect(result.name).toBe('gradle-build');
|
|
782
|
-
expect(result.script).toContain('Gradle Build');
|
|
783
|
-
expect(result.script).toContain('assembleRelease');
|
|
784
|
-
});
|
|
785
|
-
test('should support debug build', async () => {
|
|
786
|
-
const executor = new GradleBuildStepExecutor();
|
|
787
|
-
const inputs = {
|
|
788
|
-
build_type: 'Debug',
|
|
789
|
-
};
|
|
790
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
791
|
-
expect(result.script).toContain('assembleDebug');
|
|
792
|
-
});
|
|
793
|
-
test('should support custom gradle task', async () => {
|
|
794
|
-
const executor = new GradleBuildStepExecutor();
|
|
795
|
-
const inputs = {
|
|
796
|
-
gradle_task: 'bundleRelease',
|
|
797
|
-
};
|
|
798
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
799
|
-
expect(result.script).toContain('bundleRelease');
|
|
800
|
-
});
|
|
801
|
-
test('should support custom project location', async () => {
|
|
802
|
-
const executor = new GradleBuildStepExecutor();
|
|
803
|
-
const inputs = {
|
|
804
|
-
project_location: 'android',
|
|
805
|
-
};
|
|
806
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
807
|
-
expect(result.script).toContain('cd');
|
|
808
|
-
expect(result.script).toContain('android');
|
|
809
|
-
});
|
|
810
|
-
test('should support gradle options', async () => {
|
|
811
|
-
const executor = new GradleBuildStepExecutor();
|
|
812
|
-
const inputs = {
|
|
813
|
-
gradle_options: '--stacktrace --no-daemon',
|
|
814
|
-
};
|
|
815
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
816
|
-
expect(result.script).toContain('--stacktrace --no-daemon');
|
|
817
|
-
});
|
|
818
|
-
});
|
|
819
|
-
describe('AndroidLintStepExecutor', () => {
|
|
820
|
-
test('should generate lint script', async () => {
|
|
821
|
-
const executor = new AndroidLintStepExecutor();
|
|
822
|
-
const inputs = {
|
|
823
|
-
module: 'app',
|
|
824
|
-
variant: 'debug',
|
|
825
|
-
};
|
|
826
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
827
|
-
expect(result.kind).toBe('script');
|
|
828
|
-
expect(result.name).toBe('android-lint');
|
|
829
|
-
expect(result.script).toContain('lint');
|
|
830
|
-
expect(result.script).toContain(':app:lintDebug');
|
|
831
|
-
});
|
|
832
|
-
test('should support custom module', async () => {
|
|
833
|
-
const executor = new AndroidLintStepExecutor();
|
|
834
|
-
const inputs = {
|
|
835
|
-
module: 'library',
|
|
836
|
-
};
|
|
837
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
838
|
-
expect(result.script).toContain(':library:');
|
|
839
|
-
});
|
|
840
|
-
test('should capitalize variant correctly', async () => {
|
|
841
|
-
const executor = new AndroidLintStepExecutor();
|
|
842
|
-
const inputs = {
|
|
843
|
-
variant: 'release',
|
|
844
|
-
};
|
|
845
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
846
|
-
expect(result.script).toContain('lintRelease');
|
|
847
|
-
});
|
|
848
|
-
});
|
|
849
|
-
describe('AndroidUnitTestStepExecutor', () => {
|
|
850
|
-
test('should generate unit test script', async () => {
|
|
851
|
-
const executor = new AndroidUnitTestStepExecutor();
|
|
852
|
-
const inputs = {
|
|
853
|
-
module: 'app',
|
|
854
|
-
variant: 'debug',
|
|
855
|
-
};
|
|
856
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
857
|
-
expect(result.kind).toBe('script');
|
|
858
|
-
expect(result.name).toBe('android-unit-test');
|
|
859
|
-
expect(result.script).toContain('test');
|
|
860
|
-
expect(result.script).toContain(':app:testDebugUnitTest');
|
|
861
|
-
});
|
|
862
|
-
test('should support test filter', async () => {
|
|
863
|
-
const executor = new AndroidUnitTestStepExecutor();
|
|
864
|
-
const inputs = {
|
|
865
|
-
test_filter: 'com.example.MyTest',
|
|
866
|
-
};
|
|
867
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
868
|
-
expect(result.script).toContain('--tests');
|
|
869
|
-
expect(result.script).toContain('com.example.MyTest');
|
|
870
|
-
});
|
|
871
|
-
test('should support custom variant', async () => {
|
|
872
|
-
const executor = new AndroidUnitTestStepExecutor();
|
|
873
|
-
const inputs = {
|
|
874
|
-
variant: 'staging',
|
|
875
|
-
};
|
|
876
|
-
const result = await executor.execute(inputs, {}, testConfig);
|
|
877
|
-
expect(result.script).toContain('testStagingUnitTest');
|
|
878
|
-
});
|
|
879
|
-
});
|
|
880
|
-
});
|
|
881
|
-
//# sourceMappingURL=steps.test.js.map
|