The CI job for wikimedia/portals/deploy has been switched from NodeJS 10 to 12 as part of T284345. It fails to build when trying to compile fibers 2 against NodeJS 12. It seems we need to upgrade webdriver.io.
|Resolved||Jdforrester-WMF||T284345 Upgrade all CI jobs for WMF-deployed projects from Node 10 to Node 12|
|Resolved||hashar||T285239 wikimedia/portals/deploy webdriver.io has to be updated in order to support NodeJS 12|
wdio-mocha-framework → wdio-sync → fibers@2
And fibers 2 can't compile against NodeJS 12, so we are forced to upgrade the whole dependency chain and thus update from Webdriver 4 to 5. There are a bunch of issues with the repo though, so there are a few patches:
- Inject --headless and or --no-sandbox. I thought it was automatically done somehow but clearly is not. I have copied those bits from wdio-mediawiki. https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/700852
- npm run selenium would entirely ignore the exit code of wdio command and always exit 0. The shell oneliner does not abort immediately on failure and the pkill at the end always exit 0. I have changed it to use a shell trap: https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/700845/ The node12 job now fails properly but it is non voting.
- Upgrade wdio from 4 to 5 https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/700835
That makes it "work" under NodeJS 12.
I am not sure tests actually work, cause when I flip some boolean values in test.js the suite still pass and the it tests are not shown in the spec reporter. So it seems to me none of the tests are actually executed :-\
I have waste a lot of time cause wdio.conf.js had sync: true but it was not taking effect since I forgot to add @wdio/sync as a dependency :-\ I have reordered the patches:
- wdio 5 with fibers supporting nodejs 12: https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/700835/
- support for LOG_DIR environment variable to determine where screenshots get saved. That is used by CI: https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/700835/
They both pass on CI now! :-]