Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ commands:

jobs:
generate_configuration:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: medium
parameters:
isNightly:
Expand Down
47 changes: 26 additions & 21 deletions .circleci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# To modify commands to execute on CI review this file, and the script that generates it.
version: 2.1

orbs:
browser-tools: circleci/browser-tools@2.1.2

# List of parameters must be synchronized between configuration files.
parameters:
isNightly:
Expand Down Expand Up @@ -40,14 +43,6 @@ commands:
circleci step halt
fi

prepare_environment_command:
description: "Prepare environment (RAM, browsers, hosts, etc.)"
steps:
# CircleCI does not use the latest Chrome. Hence, we must install it manually.
- run:
name: Install the latest Chrome
command: yarn ckeditor5-dev-ci-install-latest-chrome

install_ssh_keys_command:
description: "Install SSH keys"
steps:
Expand All @@ -67,9 +62,14 @@ commands:
checkout_command:
description: "Clone the CKEditor 5 repository with limited depth and branches"
steps:
- run:
name: Add GitHub to known_hosts
command: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
name: Checkout code (single branch)
command: git clone --single-branch --depth 10 --branch "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" .
command: git clone --single-branch --depth 1 --branch "$CIRCLE_BRANCH" "$CIRCLE_REPOSITORY_URL" .

# In the PRs that come from forked repositories, we do not share secret variables.
# Hence, some of the scripts will not be executed. See: https://github.com/ckeditor/ckeditor5/issues/7745.
Expand Down Expand Up @@ -101,13 +101,14 @@ commands:

jobs:
cke5_manual:
machine: true
docker:
- image: cimg/node:22.12.0-browsers
resource_class: large
steps:
- checkout_command
- halt_if_short_flow
- bootstrap_repository_command
- prepare_environment_command
- browser-tools/install_chrome
- install_newest_emoji
- run:
name: Prepare DLL builds in CKEditor 5
Expand All @@ -117,12 +118,12 @@ jobs:
command: bash scripts/check-manual-tests.sh -r ckeditor5 -f ckeditor5

cke5_validators:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: medium
steps:
- checkout_command
- bootstrap_repository_command
- prepare_environment_command
- run:
when: always
name: Validate versions of CKEditor 5 dependencies
Expand Down Expand Up @@ -161,14 +162,14 @@ jobs:
command: yarn run validate-module-re-exports

cke5_coverage:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: medium
steps:
- community_verification_command
- checkout_command
- halt_if_short_flow
- bootstrap_repository_command
- prepare_environment_command
- attach_workspace:
at: .out
- run:
Expand All @@ -185,7 +186,8 @@ jobs:
command: npx coveralls -v < .out/combined_lcov.info

cke5_trigger_release_process:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: medium
steps:
- community_verification_command
Expand Down Expand Up @@ -213,7 +215,8 @@ jobs:
command: yarn ckeditor5-dev-ci-trigger-circle-build

cke5_trigger_uber_ci:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: medium
steps:
- community_verification_command
Expand All @@ -224,13 +227,13 @@ jobs:
command: yarn ckeditor5-dev-ci-trigger-circle-build

release_prepare:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: large
steps:
- checkout_command
- halt_if_short_flow
- bootstrap_repository_command
- prepare_environment_command
- run:
name: Check if packages are ready to be released
command: npm run release:prepare-packages -- --compile-only --verbose
Expand All @@ -242,7 +245,8 @@ jobs:
command: yarn run check-dependencies

notify_ci_failure:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: medium
parameters:
hideAuthor:
Expand All @@ -261,7 +265,8 @@ jobs:
no_output_timeout: 2h

stale_bot:
machine: true
docker:
- image: cimg/node:22.12.0
resource_class: medium
steps:
- checkout_command
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/check-unit-tests-for-package.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function runTests( { packageName, checkCoverage, attempts = 3 } ) {
'test',
'--reporter=dots',
'--production',
'-b ChromeHeadless',
`-f ${ shortName }`,
checkCoverage ? '--coverage' : null
].filter( Boolean );
Expand Down
10 changes: 7 additions & 3 deletions scripts/ci/generate-circleci-configuration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const bootstrapCommands = () => ( [
'checkout_command',
'halt_if_short_flow',
'bootstrap_repository_command',
'prepare_environment_command'
'browser-tools/install_chrome'
] );

const prepareCodeCoverageDirectories = () => ( {
Expand Down Expand Up @@ -120,7 +120,9 @@ const persistToWorkspace = fileName => ( {
} );

config.jobs.cke5_tests_framework = {
machine: true,
docker: [
{ image: 'cimg/node:22.12.0-browsers' }
],
steps: [
...bootstrapCommands(),
prepareCodeCoverageDirectories(),
Expand All @@ -136,7 +138,9 @@ const persistToWorkspace = fileName => ( {
// Adding batches to the root `jobs`.
featureTestBatches.forEach( ( batch, batchIndex ) => {
config.jobs[ featureTestBatchNames[ batchIndex ] ] = {
machine: true,
docker: [
{ image: 'cimg/node:22.12.0-browsers' }
],
steps: [
...bootstrapCommands(),
'install_newest_emoji',
Expand Down
15 changes: 10 additions & 5 deletions scripts/web-crawler/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import minimist from 'minimist';
import { DEFAULT_CONCURRENCY, runCrawler, toArray, isUrlValid } from '@ckeditor/ckeditor5-dev-web-crawler';
import { DEFAULT_CONCURRENCY, DEFAULT_TIMEOUT, runCrawler, toArray, isUrlValid } from '@ckeditor/ckeditor5-dev-web-crawler';

const options = parseArguments( process.argv.slice( 2 ) );

Expand All @@ -31,7 +31,8 @@ function parseArguments( args ) {
'url',
'depth',
'exclusions',
'concurrency'
'concurrency',
'timeout'
],

boolean: [
Expand All @@ -44,7 +45,8 @@ function parseArguments( args ) {
u: 'url',
d: 'depth',
e: 'exclusions',
c: 'concurrency'
c: 'concurrency',
t: 'timeout'
},

default: {
Expand All @@ -63,13 +65,15 @@ function parseArguments( args ) {
'-e', '/ckfinder/',
'-e', '/api/',
'-e', '/assets/',
'-c', DEFAULT_CONCURRENCY
'-c', DEFAULT_CONCURRENCY,
'-t', DEFAULT_TIMEOUT
], config );

const defaultOptionsForManual = minimist( [
'-u', 'http://localhost:8125/',
'-d', 1,
'-c', DEFAULT_CONCURRENCY
'-c', DEFAULT_CONCURRENCY,
'-t', DEFAULT_TIMEOUT * 2
], config );

const options = {};
Expand All @@ -94,6 +98,7 @@ function parseArguments( args ) {
url: options.url,
depth: options.depth ? Number( options.depth ) : Infinity,
exclusions: options.exclusions ? toArray( options.exclusions ).filter( exclusion => exclusion.length > 0 ) : [],
timeout: options.timeout ? Number( options.timeout ) : DEFAULT_TIMEOUT,
concurrency: options.concurrency ? Number( options.concurrency ) : 1,
silent: options.silent
};
Expand Down