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

Optimizing cypress/drone setup #39019

Merged
merged 10 commits into from
Oct 22, 2022
Merged

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Oct 22, 2022

This PR does 5 things. The first is to cache the download of the cypress binary in a local folder of the runner. Right now we are downloading the binary of cypress for each system test instance separately and verify them each time. By storing it in a caching folder on our runners, we only have to download and verify it once per runner and version and afterwards just can use those files for each build. That saves about 40 seconds per system test run, which comes down to about 3 minutes overall.

The second change is updating joomla-cypress to 0.0.16. This version changes the installation of Joomla slightly. Up till now, we were waiting for each ajax request individually and giving each a timeout of 20 seconds. For some reason, the ajax_populate1 wasn't properly caught and timed out prematurely. Now we are waiting for all ajax calls in one wait() command with a combined timeout of 2 minutes. That should fix the random issues we had with the installation in the system tests in the past.

The third change updates cypress to the latest version of 10.10.0.

The fourth change catches uncaught exceptions in cypress. These seem to be errors in the communication between cypress and the browser, but not errors in our application. The used code has been copied from the web, where the consensus was, that this would be fine...

The fifth change was a re-ordering of the steps in drone to prevent race conditions between steps with the same RDBMS (namely Postgres)

@joomla-cms-bot joomla-cms-bot added the NPM Resource Changed This Pull Request can't be tested by Patchtester label Oct 22, 2022
@Hackwar Hackwar marked this pull request as ready for review October 22, 2022 09:50
@Hackwar Hackwar requested a review from rdeutz as a code owner October 22, 2022 09:50
@HLeithner HLeithner merged commit 6f6d110 into joomla:4.3-dev Oct 22, 2022
@Hackwar Hackwar deleted the 4.3-cypress-drone branch October 22, 2022 12:08
@rdeutz rdeutz added this to the Joomla! 4.3.0 milestone Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester Unit/System Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants