Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] Improve npm dependencies installation in travis ci #1454

Merged
merged 1 commit into from
Mar 24, 2017

Conversation

PeterDaveHello
Copy link
Collaborator

No description provided.

@ljharb ljharb changed the title [Tests] Improve npm dependencies installaion in travis ci [Tests] Improve npm dependencies installation in travis ci Mar 23, 2017
.travis.yml Outdated
@@ -22,16 +22,14 @@ before_install:
- curl --version
- wget --version
- if [ -n "${SHELLCHECK-}" ]; then cabal update && cabal install transformers-0.4.3.0 ShellCheck && shellcheck --version ; fi
- if [ -n "${DOCTOCCHECK-}" ]; then nvm install node && npm install -g doctoc && type doctoc ; fi
- nvm install node && npm install && ls node_modules/urchin/urchin && ls node_modules/doctoc/doctoc.js
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of the ls commands we could use npm ls urchin doctoc here?

.travis.yml Outdated
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
script:
- if [ -n "${DOCTOCCHECK-}" ]; then cp README.markdown README.markdown.orig && npm run doctoc && diff -q README.markdown README.markdown.orig ; fi
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash nvm.sh && shellcheck -s sh nvm.sh && shellcheck -s dash nvm.sh && shellcheck -s ksh nvm.sh ; fi
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash install.sh bash_completion nvm-exec ; fi
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL ; fi
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN="${TRAVIS_BUILD_DIR}/node_modules/urchin/urchin" test-$SHELL ; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should use $(npm bin)/urchin rather than harcoding node_modules as well as the "bin" path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated!

@ljharb ljharb added the testing Stuff related to testing nvm itself. label Mar 23, 2017
.travis.yml Outdated
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
script:
- if [ -n "${DOCTOCCHECK-}" ]; then cp README.markdown README.markdown.orig && npm run doctoc && diff -q README.markdown README.markdown.orig ; fi
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash nvm.sh && shellcheck -s sh nvm.sh && shellcheck -s dash nvm.sh && shellcheck -s ksh nvm.sh ; fi
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash install.sh bash_completion nvm-exec ; fi
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL ; fi
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN="${TRAVIS_BUILD_DIR}/$(npm bin)/urchin/urchin" test-$SHELL ; fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the Travis build dir is needed at all; npm bin is an absolute path.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you now don't need the double urchin. Just $(npm bin)/urchin alone should be sufficient.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, sorry for my careless, just fixed it

@ljharb ljharb merged commit e41197e into nvm-sh:master Mar 24, 2017
@PeterDaveHello PeterDaveHello deleted the travis-ci-npm-dep branch March 24, 2017 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Stuff related to testing nvm itself.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants