ckeditor / ckeditor4-benderjs-runner Goto Github PK
View Code? Open in Web Editor NEWBender.js runner for CKEditor 4
License: Other
Bender.js runner for CKEditor 4
License: Other
As mentioned in README:
I have tested it one day and it seems to be doable AFAIR. The only issue could be with IE8 which displays alert about long executing script for bender and I'm not sure if it can be somehow disabled.
It should be doable but it's not really a small task. OTOH launchpad
used here for launching browsers already have some API for using BrowserStack so it should work in a similar manner as launching local browsers. Additionally, tunneling will be needed here so BS can access locally launched bender instance.
I noticed when running locally, that browser instances are not correctly closed sometimes. Since we would like to run this on CI, it shouldn't matter much, but could be improved.
While generating the difference between branch and target branch, the travis task fails.
More details:
t/4866
and major
branch.Frontend runner uses fetch
API to send tests results to backend server. This means it will not work on any IE browser. We could go with feature detection here and use other method if fetch
is not available.
At the moment, logging is here and gives enough information. However, it could look slightly better and could use some colors and better formatting.
As mentioned in README:
There are Linux, macOS and Windows images available so I assume at least Chrome, Firefox, Edge, Safari and IE11 can be covered here. For IE8-IE10 and mobiles (so Chrome@Android and Safari@iOS) we will need integration with BrowserStack (or similar service).
Since GH Actions allows matrix runs it will be easier to define - I'm not only sure if such steps run simultaneously (that would be faster) or one after another.
We can try with forked ckeditor/ckeditor4
repo. I guess the workflow could be triggered on commit
and pullrequest
events in ckeditor4
repo, checkout ckeditor4-benderjs-runner
and try to run tests.
The code works but could be slightly improved to be more readable and us Bender API whenever possible. Also it should work on older IEs so no ES6 here unfortunately.
Related issues: #6.
Right now - changes in package.json produce an empty test query.
Due to the nature of such changes - it should be rather a full run. I know that our deps are only the 'dev' one - but still - passed full run indicates that nothing breaks. Also, invalid changes should be visible at least at installing deps level.
There are some runs where browser is launched and then nothing happens, for example:
I'm not sure why it happens. I was not able to reproduce it locally so far too. I suspect some issue with frontened runner and browser focus maybe? But the cause may be totally different ofc ๐ค
There is some issue with JSON parsing. See https://travis-ci.org/github/ckeditor/ckeditor4-benderjs-runner-tests/builds/750367960#L251.
Travis (or rather GitHub itself ๐ค) supports [skip ci]
flag which skips CI runs when added to specific commit for this commit. We could have something similar (for commit title/message) which allows:
[tests:skip]
[tests:all]
[tests:testsPath]
([tests:is:unit,path:/tests/plugins/image2]
)This can help us run more/less tests if we see there is some mismatch in tests diff thing (see #1). Or do a full run if we see that changes introduced are really broad.
Related to #1.
As mentioned in README:
It can greatly decrease CI run times (as we don't want to run all tests each time). For PRs it should be easy since GH provides a way to get PR target branch (so diffing all changes is easy), for branches (not yet PRs) we could compare against main branches (so
master
andmajor
- should be defined in config) and assume that target branch is the one which has less changes against. For commits pushed directly to main branches (somaster
andmajor
- again should be configurable) we could only get changes from latest commit (which will basically cover all PR changes for merge commits) and also do full runs only once in a while (e.g. on a daily basis).
So the general idea is to diff with target branch, see all JS file which were changed and then decide which tests should to be run, ย few examples:
If something is changed in test file we may simply run only this file or all test for a given plugin (because it might be some helper which have changed).
If plugin code is changed we should run all tests for this plugin and all plugins which depends on it (in this case embed
, image2
,...)
Not 100% sure here, but it will be good to run most/all core tests and tests for most crucial plugins (and it's dependants) like widget
, dialog
, clipboard
, etc
No tests should be run.
We had a PR from community ckeditor/ckeditor4#4837 which was set up on the same branch name as the target branch but from the fork.
It ends with an empty test query, so we have no test run: https://app.travis-ci.com/github/ckeditor/ckeditor4/jobs/532205765
We should be able to detect differences in another origin.
The code works but could be slightly improved to be more readable and split better into more reasonable parts. There are also some "not really nice" quick hacks here and there which could be ironed too.
At the moment it gest stuck on launching bender NPM subtask - https://travis-ci.org/github/ckeditor/ckeditor4-benderjs-runner-tests/jobs/750407154#L142.
I did some adjustments (which fixed error which was thrown), but it still doesn't run correctly. Maybe there is an issue with paths ๐ค
It would be nice to have Safari support. When we worked in December on the runner it worked with Travis CI osx image just fine (apart from #10) - see for example ckeditor/ckeditor4-benderjs-runner-tests@fb69346 and https://travis-ci.org/github/ckeditor/ckeditor4-benderjs-runner-tests/builds/750370942.
After getting back to this in May, Travis was not able to trigger any job containing osx image config. The job simply didn't run and when triggering manual Travis CI was giving were vague error (see related commits in ckeditor/ckeditor4-benderjs-runner-tests#3).
We can try with osx image once again and dig deeper or go with BS straightaway (#4) which should also solve this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.