-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from ckeditor/i/177
Internal: Migrate CI from Travis to Circle. Closes #177.
- Loading branch information
Showing
5 changed files
with
119 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
version: 2.1 | ||
|
||
parameters: | ||
isNightly: | ||
type: boolean | ||
default: false | ||
|
||
commands: | ||
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 | ||
|
||
bootstrap_repository_command: | ||
description: "Bootstrap the repository" | ||
steps: | ||
- install_ssh_keys_command | ||
- run: | ||
name: Install dependencies | ||
command: yarn install | ||
|
||
install_ssh_keys_command: | ||
description: "Install SSH keys" | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "2a:97:94:d9:ae:a0:8d:bd:c2:2a:2d:cf:8d:d1:94:bd" | ||
|
||
community_verification_command: | ||
description: "👤 Verify if the build was triggered by community - Check if the build should continue" | ||
steps: | ||
- run: | ||
name: 👤 Verify if the build was triggered by community - Check if the build should continue | ||
command: | | ||
#!/bin/bash | ||
if [[ -z ${COVERALLS_REPO_TOKEN} ]]; | ||
then | ||
circleci-agent step halt | ||
fi | ||
jobs: | ||
notify_ci_failure: | ||
machine: true | ||
parameters: | ||
hideAuthor: | ||
type: string | ||
default: "false" | ||
steps: | ||
- checkout | ||
- bootstrap_repository_command | ||
- community_verification_command | ||
- run: | ||
environment: | ||
CKE5_SLACK_NOTIFY_HIDE_AUTHOR: << parameters.hideAuthor >> | ||
CKE5_PIPELINE_NUMBER: << pipeline.number >> | ||
name: Waiting for other jobs to finish and sending notification on failure | ||
command: yarn ckeditor5-dev-ci-circle-workflow-notifier | ||
no_output_timeout: 1h | ||
|
||
main: | ||
machine: true | ||
steps: | ||
- checkout | ||
- bootstrap_repository_command | ||
- prepare_environment_command | ||
- run: | ||
name: Execute ESLint | ||
command: yarn run lint | ||
- run: | ||
name: Check coverage | ||
command: yarn run test --coverage | ||
- run: | ||
name: Run tests on Firefox | ||
command: yarn run test --browsers=Firefox | ||
- unless: | ||
# Upload the code coverage results for non-nightly builds only. | ||
condition: << pipeline.parameters.isNightly >> | ||
steps: | ||
- community_verification_command | ||
- run: | ||
name: Upload code coverage | ||
command: cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js | ||
|
||
workflows: | ||
version: 2 | ||
main: | ||
unless: << pipeline.parameters.isNightly >> | ||
jobs: | ||
- main | ||
- notify_ci_failure: | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
|
||
nightly: | ||
when: << pipeline.parameters.isNightly >> | ||
jobs: | ||
- main | ||
- notify_ci_failure: | ||
hideAuthor: "true" | ||
filters: | ||
branches: | ||
only: | ||
- master |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters