How can I install a specific node.js version on a PHP container on Travis CI?

前端 未结 1 1147
时光取名叫无心
时光取名叫无心 2021-01-12 22:30

For a Laravel project I use Travis Ci with the language option as PHP. Besides PHP I want to do some Node JS testing. The default installed version of Node JS does not meet

相关标签:
1条回答
  • 2021-01-12 22:53

    In search for an answer to the same question I ended up here, and there, and this helped me:

    language: php
    
    php:
      - 7.0
      - 7.1
    
    before_install:
      - nvm install 6.10
    
    install
      - npm install
    

    Note: Installing this in the before_install section as I am installing the actual packages in the install section.

    0 讨论(0)
提交回复
热议问题