Hello!
Has anyone set up the bitrise pipelines to run their Detox tests? I am having trouble building the app in one stage and then using the intermediate file to then run the tests on that build in a different stage.
My ideal pipeline would be
Stage 1 - Workflow 1 -Build the app
Stage 2 - Workflow 1 - Pull the app from stage 1, and run test suite 1
- Workflow 2- Pull the app from stage 1, and run test suite 2
- Workflow 3- Pull the app from stage 1, and run test suite 3
etc etc
But right now while I deploy the app in stage 1 workflow 1, it is not being picked up in stage 2 at all
Here is an excerpt from my bitrise.yml with the relevant workflows
pipelines:
build-and-run-e2e-tests:
stages:
- build-ios: {}
- test-ios: {}
stages:
build-ios:
workflows:
- e2e-test-ios-build: {}
test-ios:
workflows:
- run-e2e-accountNavigation: {}
- run-e2e-appNavigation: {}
workflows:
e2e-test-ios-build:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.2: {}
- cache-pull@2: {}
- nvm@1:
inputs:
- node_version: 18.19.1
- npm@1:
inputs:
- command: ci
- script@1:
inputs:
- content: |-
brew tap wix/brew
brew install applesimutils
- cocoapods-install@2: {}
- xcode-build-for-test@3:
inputs:
- destination: generic/platform=iOS Simulator
- deploy-to-bitrise-io@2:
inputs:
- deploy_path: ""
- pipeline_intermediate_files: $BITRISE_TEST_BUNDLE_PATH:BITRISE_TEST_BUNDLE_PATH
- cache-push@2: {}
run-e2e-accountNavigation:
steps:
- pull-intermediate-files@1:
inputs:
- artifact_sources: build_ios.e2e-test-ios-build
- script@1:
inputs:
- content: |-
npx detox test -c ios.sim.debug.ci e2e/accountNavigation.test.ts --record-videos failing --artifacts-location ./artifacts/detox_artifacts/
- deploy-to-bitrise-io@2:
run_if: .IsBuildFailed
is_always_run: true
inputs:
- is_compress: "true"
run-e2e-appNavigation:
steps:
- pull-intermediate-files@1:
inputs:
- artifact_sources: build_ios.e2e-test-ios-build
- script@1:
inputs:
- content: |-
npx detox test -c ios.sim.debug.ci e2e/appNavigation.test.ts --record-videos failing --artifacts-location ./artifacts/detox_artifacts/
- deploy-to-bitrise-io@2:
run_if: .IsBuildFailed
is_always_run: true
inputs:
- is_compress: "true"
The output for the from the Pull Intermediate Files
step is
Input:
- artifact_sources: build_ios.e2e-test-ios-build
- verbose: false
- app_slug: [redacted]
- finished_stage: [{"created_at":"2024-04-09T16:46:43.771226Z","finished_at":"2024-04-09T17:01:40Z","id":"[Redacted]","name":"build-ios","put_on_hold_at":null,"started_at":"2024-04-09T16:46:46Z","status":"succeeded","triggered_at":"2024-04-09T16:46:44.769798Z","workflows":[{"credit_cost":null,"external_id":[Redacted],"finished_at":"2024-04-09T17:01:40Z","id":[Redacted],"name":"e2e-test-ios-build","started_at":"2024-04-09T16:46:46Z","status":{"Name":"succeeded","StatusLevel":5}}]}]
- bitrise_api_base_url: https://api.bitrise.io
- bitrise_api_access_token: *****
Getting the list of artifacts of 0 builds
Downloading 0 artifacts