Page MenuHomePhabricator

Integrate Cypress into our GitHub CI
Closed, ResolvedPublic

Description

Finish the Cypress PoC and integrate it into the QueryBuilder CI.

acceptance criteria

  • the Cypress test in Cypress PoC runs for every push and pull request
  • the Cypress test runs locally
NOTE: It is good enough if the integration into GitHub CI is somewhat hacky as it is only temporary until the Query Builder repository and CI is moved to WMF Gerrit and CI

Related Objects

Event Timeline

Cypress is now successfully integrated with github actions CI.
thank you for the work @Jakob_WMDE and @Michael

@Jakob_WMDE thank you for the excellent points you wrote down in the PR.
the issues you've mentioned will be addressed in subsequent tickets

to run the tests locally, simply run

docker-compose --env-file .env -f docker-compose.yml -f docker-compose.e2e.yml up e2e

It's failing 🤔

e2e_1   | 
e2e_1   | ====================================================================================================
e2e_1   | 
e2e_1   |   (Run Starting)
e2e_1   | 
e2e_1   |   ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
e2e_1   |   │ Cypress:    6.3.0                                                                              │
e2e_1   |   │ Browser:    Chrome 87 (headless)                                                               │
e2e_1   |   │ Specs:      1 found (basic-query.spec.js)                                                      │
e2e_1   |   └────────────────────────────────────────────────────────────────────────────────────────────────┘
e2e_1   | 
e2e_1   | 
e2e_1   | ────────────────────────────────────────────────────────────────────────────────────────────────────
e2e_1   |                                                                                                     
e2e_1   |   Running:  basic-query.spec.js                                                             (1 of 1)
e2e_1   | 
e2e_1   | Timed out waiting for the browser to connect. Retrying...
e2e_1   | Warning: Cypress failed to connect to Chrome via stdio after 1 minute, 0 seconds. Falling back to TCP...
e2e_1   | Connecting to Chrome via TCP was successful, continuing with tests.
e2e_1   | 
e2e_1   | 
e2e_1   |   Basic Query
e2e_1   | 
e2e_1   | 
e2e_1   |   Basic Query
e2e_1   |     ✓ can create a query with a single condition (3432ms)
e2e_1   | 
e2e_1   | 
e2e_1   |   1 passing (4s)
e2e_1   | 
e2e_1   | 
e2e_1   |   (Results)
e2e_1   | 
e2e_1   |   ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
e2e_1   |   │ Tests:        1                                                                                │
e2e_1   |   │ Passing:      1                                                                                │
e2e_1   |   │ Failing:      0                                                                                │
e2e_1   |   │ Pending:      0                                                                                │
e2e_1   |   │ Skipped:      0                                                                                │
e2e_1   |   │ Screenshots:  0                                                                                │
e2e_1   |   │ Video:        true                                                                             │
e2e_1   |   │ Duration:     3 seconds                                                                        │
e2e_1   |   │ Spec Ran:     basic-query.spec.js                                                              │
e2e_1   |   └────────────────────────────────────────────────────────────────────────────────────────────────┘
e2e_1   | 
e2e_1   | 
e2e_1   |   (Video)
e2e_1   | 
e2e_1   |   -  Started processing:  Compressing to 32 CRF                                                     
e2e_1   |   1) can create a query with a single condition
e2e_1   |   -  Finished processing: /cypress/videos/basic-query.spec.js.mp4                        (2 seconds)
e2e_1   | 
e2e_1   | 
e2e_1   | ====================================================================================================
e2e_1   | 
e2e_1   |   (Run Finished)
e2e_1   | 
e2e_1   | 
e2e_1   |        Spec                                              Tests  Passing  Failing  Pending  Skipped  
e2e_1   |   ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
e2e_1   |   │ ✖  basic-query.spec.js                      00:05        1        -        1        -        - │
e2e_1   |   └────────────────────────────────────────────────────────────────────────────────────────────────┘
e2e_1   |     ✖  1 of 1 failed (100%)                     00:05        1        -        1        -        -  
e2e_1   | 
query-builder_e2e_1 exited with code 1