Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

(Manually) released build still failing on Travis (Cypress) #74

Closed
dotherightthing opened this issue Oct 6, 2019 · 3 comments
Closed
Assignees

Comments

@dotherightthing
Copy link
Owner

dotherightthing commented Oct 6, 2019

This appears to be due to a mismatch between http://dontbelievethehype2.dan (local) and https://dontbelievethehype.co.nz/ (live), because the beforeEach() #itchy-feet .wpdtrt-gallery-viewer hook only exists on local. This is to be expected given that the tests will only pass once the new code has been deployed..

This reinforces the need for #72, or a staging site.

As it stands, I'll need to:

  1. Tag the failing build and push it to master
  2. The Travis build will fail and the release.zip referenced by wpdtrt-dbth (once updated) won't be updated
  3. Set the cypress.json baseUrl to http://dontbelievethehype2.dan on local dev
  4. In local terminal, export TRAVIS="true" to fake the CI
  5. Run the yarn run build
  6. Manually upload the generated release.zip plugin to the live site
  7. Re run the failing Travis build
  8. The Travis build should now pass
  9. Update wpdtrt-dbth to reference the latest build release.zip
  10. Log in to WordPress and run the update (this should not be necessary as the versions should match)
@dotherightthing
Copy link
Owner Author

dotherightthing commented Oct 6, 2019

After deploying the plugin and re-running the failed Travis build, the Travis build still fails.

Re-running the build on local..

@dotherightthing
Copy link
Owner Author

Build was failing due to images being slightly narrower on live, for some reason.

Build now runs ok on local, but still fails on live. Waiting for Cypress to finish running test so can see the video (known Cypress bug where dashboard doesn't update immediately)

@dotherightthing dotherightthing changed the title Cypress failing on Travis only (Manually) released build still failing on Travis (Cypress) Oct 6, 2019
@dotherightthing dotherightthing pinned this issue Oct 6, 2019
@dotherightthing
Copy link
Owner Author

dotherightthing commented Oct 11, 2019

Exposed errors by switching to execa, see dotherightthing/wpdtrt-plugin-boilerplate#73 (comment)

/home/travis/.cache/Cypress/3.4.1/Cypress/Cypress: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

Travis CI has changed its underlying OS image, causing this problem. Luckily it is simple to fix, see https://docs.cypress.io/guides/guides/continuous-integration.html#Travis

See: cypress-io/cypress#4841 (comment)

Error is caused by a missing dependency: libgconf-2.so.4

dotherightthing added a commit that referenced this issue Oct 11, 2019
* development: (34 commits)
  Update wpdtrt-plugin-boilerplate, from 1.6.14 to 1.6.17
  Add cypress-plugin-retries (workaround for #80), add execa
  Add missing Cypress dependency libgconf-2.so.4 (fixes #74)
  Update wpdtrt-plugin-boilerplate, from 1.6.12 to 1.6.14
  Update dependencies
  Update wpdtrt-plugin-boilerplate, from 1.6.12 to 1.6.14
  Fix Bash conditionals
  Don't install Mono on CI on dev branch (dotherightthing/wpdtrt-plugin-boilerplate#173)
  Lint fixes
  Exclude PHPDoc sniffs
  TODO
  Ignore backup files
  Reinstate live website URL for Cypress tests
  Reinstate failing test (see #67)
  Fix variable name
  Ignore VS Code plugin configuration files (e.g. for XDebug launch)
  Use correct variable types (fixes #77)
  Revert to original filename for PHPUnit XML config file
  Ignore test images
  Use existing syntax to disable admin test
  ...
@dotherightthing dotherightthing unpinned this issue Oct 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant