laratools / docs

Documentation for laratools
https://laratools.com
MIT License
1 stars 0 forks source link

Document `BASH_ENV` for using nvm #12

Open iWader opened 6 years ago

iWader commented 6 years ago

To use nvm you need to load the ~/.nvm/nvm.sh script as it doesn't load by default due to it being a non-interactive environment.

CircleCI

jobs:
  build:
    environment:
        BASH_ENV: ~/.nvm/nvm.sh

It's already documented for Gitlab CI

danbenn commented 4 years ago

This is incorrect. The correct path is below:

jobs:
  build:
    environment:
        BASH_ENV: source /opt/circleci/.nvm/nvm.sh

Verified this works as of February 2020.

dimzeta commented 4 years ago

The first one works for me:

jobs:
  build:
    docker:
      - image: laratools/ci:7.2
        environment:
          BASH_ENV: ~/.nvm/nvm.sh
      - image: circleci/mysql:5.7
        environment:
          MYSQL_ALLOW_EMPTY_PASSWORD: true
          MYSQL_DATABASE: laravel
          MYSQL_HOST: 127.0.0.1
          MYSQL_ROOT_HOST: '%'
          MYSQL_USER: root
          MYSQL_ROOT_PASSWORD: ''