Page MenuHomePhabricator

Setup CI for Wikipedia-Previews
Closed, ResolvedPublic

Description

Configure CI for https://github.com/wikimedia/wikipedia-previews

It should at least

  • npm test
  • npm run build
  • update the demo on gh-pages with the latest build

Related

Event Timeline

SBisson created this task.Dec 6 2019, 4:47 PM
Restricted Application added a project: Inuka-Team. · View Herald TranscriptDec 6 2019, 4:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
SBisson renamed this task from Setup CI to Setup CI for Wikipedia-Previews.Dec 6 2019, 4:47 PM
SBisson edited projects, added Inuka-Team (Kanban); removed Inuka-Team.
SBisson moved this task from Backlog to Ready for Dev on the Inuka-Team (Kanban) board.
AMuigai moved this task from Kanban to Next up on the Inuka-Team board.Dec 17 2019, 7:43 AM
AMuigai edited projects, added Inuka-Team; removed Inuka-Team (Kanban).
AMuigai triaged this task as Medium priority.May 14 2020, 1:43 PM
AMuigai moved this task from Next up to Kanban on the Inuka-Team board.May 21 2020, 1:34 PM
AMuigai edited projects, added Inuka-Team (Kanban); removed Inuka-Team.
Jpita added a subscriber: Jpita.Jun 1 2020, 2:24 PM

I would like to run this test suite on every CI build
https://app.crossbrowsertesting.com/automation/suites/5ed47d4ec461b06c046b84ea
According to the documentation
https://crossbrowsertesting.com/apidocs/v3/automation.html#!/Suites/post_automation_suites_suite_id_runs
this is possible but I haven't had success, I have either a 401 or a 403 when I call the endpoint
POST https://crossbrowsertesting.com/api/v3/automation/suites/5ed47d4ec461b06c046b84ea/runs

I'm in contact with the customer service to see if I can fix the issue, should be only an auth issue.

Jpita added a comment.Jun 1 2020, 3:32 PM

UPDATE:

manage to run the suite using the api (basic auth with username (email) and password (apikey)).
the endpoint returns a json with a suite_run_id that we can then call another endpoint to see if the build is finished and check the result. https://crossbrowsertesting.com/api/v3/automation/suites/5ed47d4ec461b06c046b84ea/runs/5ed511875b34d146bbec5c27

https://crossbrowsertesting.com/apidocs/v3/automation.html#!/Suite_Runs/get_automation_suites_suite_id_runs_suite_run_id

this is not optimal though, because we either need to run the suite and check the result manually or write code to wait for the build to finish and pass or fail our circleCI build depending on the result.

Another option is to run selenium tests on our build using crossbrowsertesting as the browser.
I'm trying that as we speak, will post updates later

Jpita added a comment.Jun 1 2020, 4:10 PM

The tests are now running against the browsers in cbt
https://app.circleci.com/pipelines/github/wikimedia/wikipedia-previews/12/workflows/ac11dec9-ef09-49d0-932c-9d4faaad4581/jobs/12/steps


The build fails if the tests fail.
I changed the circleCI file to be able to run the tests (needed a python image) so now we just need to find a way to have both the node image building the code and deploying to a demo url and once that's complete, use the python image to run the tests.
I just did it in python because most of the examples were in python and I couldn't run the tests in javascript, I'll try to find a way to do it with javascript so we can use the node image for everything

SBisson claimed this task.Jun 3 2020, 2:04 AM
SBisson moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.
Jpita added a comment.Jun 3 2020, 2:07 AM

The tests are now running against the browsers in cbt
https://app.circleci.com/pipelines/github/wikimedia/wikipedia-previews/12/workflows/ac11dec9-ef09-49d0-932c-9d4faaad4581/jobs/12/steps


The build fails if the tests fail.
I changed the circleCI file to be able to run the tests (needed a python image) so now we just need to find a way to have both the node image building the code and deploying to a demo url and once that's complete, use the python image to run the tests.
I just did it in python because most of the examples were in python and I couldn't run the tests in javascript, I'll try to find a way to do it with javascript so we can use the node image for everything

this is not in master of course, it's in a separate branch https://github.com/wikimedia/wikipedia-previews/tree/cbt-experiments

SBisson moved this task from Code Review to QA on the Inuka-Team (Kanban) board.Mon, Jun 15, 2:29 PM
AMuigai closed this task as Resolved.Tue, Jun 16, 12:11 PM