Skip to content

Commit

Permalink
Merge pull request #5516 from ckeditor/circle-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KarolDawidziuk authored Sep 26, 2023
2 parents 21a340f + 139df60 commit 2335d84
Show file tree
Hide file tree
Showing 16 changed files with 77 additions and 183 deletions.
70 changes: 70 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
version: 2.1
orbs:
browser-tools: circleci/[email protected]

workflows:
test:
jobs:
- test_chrome
- test_firefox

jobs:
test_chrome:
docker:
- image: cimg/node:10.24.1-browsers
steps:
- browser-tools/install-browser-tools
- checkout
- run:
name: Install npm
command: npm install --prefix=$HOME/.local install npm@7 -g
- run:
name: Install dependencies
command: npm install
- run:
name: Install Bender.js CLI
command: npm install --prefix=$HOME/.local benderjs-cli -g
- run:
name: Setup Bender.js test runner
command: |
cd ..
git clone https://github.com/ckeditor/ckeditor4-benderjs-runner.git --branch v1.2.0 --single-branch
cd ckeditor4-benderjs-runner
npm i
pwd
- run:
name: Run tests on Chrome
command: |
cd ../ckeditor4-benderjs-runner
pwd
npm run start -- --configFile "../../project/bender-runner.config.json" --browser "chrome" --fullRun "fullRun" --repoPath "../project/"
test_firefox:
docker:
- image: cimg/node:10.24.0-browsers
steps:
- browser-tools/install-browser-tools
- checkout
- run:
name: Install npm
command: npm install --prefix=$HOME/.local install npm@7 -g
- run:
name: Install dependencies
command: npm install
- run:
name: Install Bender.js CLI
command: npm install --prefix=$HOME/.local benderjs-cli -g
- run:
name: Setup Bender.js test runner
command: |
cd ..
git clone https://github.com/ckeditor/ckeditor4-benderjs-runner.git --branch v1.2.0 --single-branch
cd ckeditor4-benderjs-runner
npm i
pwd
- run:
name: Run tests on Chrome
command: |
cd ../ckeditor4-benderjs-runner
pwd
npm run start -- --configFile "../../project/bender-runner.config.json" --browser "firefox" --fullRun "fullRun" --repoPath "../project/"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# All "dot directories".
.*/**
# Ok, almost all – we need CircleCI config.
!.circleci/**

node_modules/**
build/**
Expand Down
105 changes: 0 additions & 105 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![npm version](https://badge.fury.io/js/ckeditor4.svg)](https://www.npmjs.com/package/ckeditor4)
[![GitHub tag](https://img.shields.io/github/tag/ckeditor/ckeditor4.svg)](https://github.com/ckeditor/ckeditor4)
[![Build Status](https://app.travis-ci.com/ckeditor/ckeditor4.svg?branch=master)](https://app.travis-ci.com/ckeditor/ckeditor4)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/ckeditor/ckeditor4/tree/master.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/ckeditor/ckeditor4/tree/master)


[![Join newsletter](https://img.shields.io/badge/join-newsletter-00cc99.svg)](http://eepurl.com/c3zRPr)
Expand Down
1 change: 0 additions & 1 deletion bender.ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
var config = require( './bender' );

config.startBrowser = process.env.BROWSER || 'Chrome';
config.isTravis = true;
config.startBrowserOptions = {
Chrome: '--headless --disable-gpu',
Firefox: '-headless'
Expand Down
2 changes: 1 addition & 1 deletion dev/builder/build-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var CKBUILDER_CONFIG = {
'.bender',
'bender-err.log',
'bender-out.log',
'.travis.yml',
'.circleci',
'dev',
'docs',
'.DS_Store',
Expand Down
37 changes: 0 additions & 37 deletions dev/travis/build.sh

This file was deleted.

7 changes: 0 additions & 7 deletions dev/travis/buildpath.sh

This file was deleted.

11 changes: 0 additions & 11 deletions tests/core/dom/range/getclientrects.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,12 @@
'use strict';

var doc = CKEDITOR.document,
isTravisAndFirefox = bender.config.isTravis && CKEDITOR.env.gecko,

tests = {
setUp: function() {
this.playground = doc.getById( 'playground' );
},

_should: {
ignore: {
// Tests randomly fails on FF in Travis
'test only element selection': isTravisAndFirefox,
'test last element selection': isTravisAndFirefox,
'test two line selection': isTravisAndFirefox,
'test three line selection': isTravisAndFirefox
}
},

'test only element selection': function() {
this._assertRectList( 'only-element-selection', {
defaultExpected: {
Expand Down
5 changes: 0 additions & 5 deletions tests/core/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,11 +633,6 @@
},

'test buffers.throttle': function() {
if ( bender.config.isTravis && CKEDITOR.env.gecko ) {
// test randomly fails on FF on Travis.
assert.ignore();
}

var foo = 'foo',
baz = 'baz',
inputSpy = sinon.spy(),
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/balloonpanel/cssloading.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// 'removeDots' is necessary to properly compare URL. We cannot use absolute url, as test might have additional folders in URL.
// Tests run in bender:
// * from dashboard have address like: http://tests.ckeditor.test/tests/plugins/balloonpanel/cssloading
// * from jobs on Travis have address like: http://tests.ckeditor.test/jobs/VY5lgovj70g1AOkv/tests/tests/plugins/balloonpanel/cssloading
// * from jobs on CI have address like: http://tests.ckeditor.test/jobs/VY5lgovj70g1AOkv/tests/tests/plugins/balloonpanel/cssloading
// This is why there have to be relative URL. However 'appendStyleSheet' receive final URL which does not contain dots in address.
// It's necessary to adapt URL address to be properly compared in assertion.
sinon.assert.calledWith( spy, balloonTestsTools.getDocumentOrigin() +
Expand Down
2 changes: 1 addition & 1 deletion tests/plugins/balloontoolbar/cssloading.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// 'removeDots' is necessary to properly compare URL. We cannot use absolute url, as test might have additional folders in URL.
// Tests run in bender:
// * from dashboard have address like: http://tests.ckeditor.test/tests/plugins/balloonpanel/cssloading
// * from jobs on Travis have address like: http://tests.ckeditor.test/jobs/VY5lgovj70g1AOkv/tests/tests/plugins/balloonpanel/cssloading
// * from jobs on CI have address like: http://tests.ckeditor.test/jobs/VY5lgovj70g1AOkv/tests/tests/plugins/balloonpanel/cssloading
// This is why there have to be relative URL. However 'appendStyleSheet' receive final URL which does not contain dots in address.
// It's necessary to adapt URL address to be properly compared in assertion.
sinon.assert.calledWith( spy, balloonTestsTools.getDocumentOrigin() +
Expand Down
3 changes: 1 addition & 2 deletions tests/plugins/balloontoolbar/positioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@
},

'test panel - out of view - hcenter top': function( editor ) {
if ( editor.name == 'divarea' || ( bender.config.isTravis && bender.tools.env.isBuild ) ) {
if ( editor.name == 'divarea' ) {
// divarea tests are failing, it's an upstream issue from balloonpanel (#1064).
// Ignore test with builded editor in travis.
assert.ignore();
}

Expand Down
4 changes: 0 additions & 4 deletions tests/plugins/easyimage/balloontoolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@
},

'test balloontoolbar positioning': function( editor, bot ) {
// Ignore test with builded editor in travis.
if ( bender.config.isTravis && bender.tools.env.isBuild ) {
assert.ignore();
}
// Force toolbar to always appear under the widget.
editor.container.getWindow().$.scroll( 0, editor.container.getDocumentPosition().y );

Expand Down
3 changes: 0 additions & 3 deletions tests/plugins/easyimage/uploadintegrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@
assert.ignore();
}

if ( bender.config.isTravis && CKEDITOR.env.gecko ) {
assert.ignore();
}
this.sandbox.stub( window, 'alert' );

this.editorBot.setHtmlWithSelection( '<p>^</p>' );
Expand Down
4 changes: 0 additions & 4 deletions tests/plugins/imagebase/features/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
},

setUp: function() {
if ( bender.config.isTravis && CKEDITOR.env.gecko ) {
assert.ignore();
}

bender.tools.ignoreUnsupportedEnvironment( 'easyimage' );

this.editorBot.setHtmlWithSelection( '<p>^</p>' );
Expand Down

0 comments on commit 2335d84

Please sign in to comment.