WordPress-Coding-Standards icon indicating copy to clipboard operation
WordPress-Coding-Standards copied to clipboard

phpenv not always available

Open wgroenewold opened this issue 5 years ago • 4 comments

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 develop branch of WPCS.

wgroenewold avatar Jun 09 '20 15:06 wgroenewold

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 avatar Jun 09 '20 16:06 jrfnl

@jrfnl Sure, once I got my Gitlab CI completely working I can document it and share it here as well.

wgroenewold avatar Jun 10 '20 09:06 wgroenewold

I quickly documented an example for Gitlab CI in the following Gist.

https://gist.github.com/wgroenewold/c2759e203c1300b0e3bc6583793353ab

wgroenewold avatar Jun 10 '20 10:06 wgroenewold

@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.

jrfnl avatar Aug 20 '23 17:08 jrfnl