phpenv not always available
Bug Description
The TravisCI example expects a rehash of phpenv, but phpenv is not available at my CI so a check would be pleasant.
What did you expect to happen? What actually happened? I expected it to miss instead of hit because of a dependency check
Minimal Code Snippet
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
Environment
| Question | Answer |
|---|---|
| PHP version | 7.2 |
| PHP_CodeSniffer version | latest |
| WPCS version | latest |
| WPCS install type | git clone |
| IDE (if relevant) | not relevant |
Additional Context (optional)
I found this issue when I tried to port the code for Travis CI to Gitlab CI.
Tested Against develop branch?
- [ ] I have verified the issue still exists in the
developbranch of WPCS.
He @wgroenewold Oh.. it would be great if we could add a GitLib CI example of how to set this up to the README / wiki! Would you be willing to write up what you ended up with to add to the README ?
P.S.: Heads-up: the install instructions including the CI setup instructions will change in WPCS 3.0.0.
@jrfnl Sure, once I got my Gitlab CI completely working I can document it and share it here as well.
I quickly documented an example for Gitlab CI in the following Gist.
https://gist.github.com/wgroenewold/c2759e203c1300b0e3bc6583793353ab
@wgroenewold Just checking - would you still be up for adding a GitLab example to the wiki ? It is publicly editable, so you should be able to create a page for it.