Skip to content

Setting node_version is ignored at ios_build_and_test #51

@MateusAndrade

Description

@MateusAndrade

Orb version

4.1.0

What happened

Whenever I use the job ios_build_and_test:

      - react-native/ios_build_and_test:
          checkout: true
          build_configuration: Release
          detox_configuration: ios.sim.release
          device: iPhone X
          node_version: '10.17'
          project_path: ios/AppName.xcworkspace
          requires:
            - another-command
          scheme: AppName

When the job runs

I got an error, because of a dependency on my project, requires using the node_version < 10.17.

I saw that whenever you call:

- run:
name: Install node@<<parameters.node_version>>
# after `curl`, bashrc contains the script to load nvm, we need to source it to use it
command: |
set +e
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
command -v nvm
nvm install <<parameters.node_version>>
nvm alias default <<parameters.node_version>>
- run:
name: Verify node version
command: node --version

He will fetch nvm and set the version on macos 11.0.0 executor. But on the subsequent job, that shows the node -v, you still got the default version of the macos executor. With is: 12.0.

https://circle-macos-docs.s3.amazonaws.com/image-manifest/v1969/index.html

Expected behavior

Calling yarn_install passing node_version at ios_build_and_test would save the version to subsequent jobs.

Maybe we can add a parameter to check if I want a specific version of node when calling yarn_install.

ScreenShots

Screen Shot 2020-04-17 at 16 37 28

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions