forked from code-dot-org/code-dot-org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
134 lines (134 loc) · 4.32 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
general:
artifacts:
- apps/yarn-error.log
- apps/coverage
- dashboard/coverage
- dashboard/test/ui
- dashboard/log
- pegasus/log
machine:
ruby:
version: 2.2.3
node:
version: 6.9
java:
version: openjdk8 # used for Applitools merge API tool
environment:
RAILS_ENV: test
RACK_ENV: test
SPROCKETS_DERAILLEUR_WORKER_COUNT: 2 # CircleCI build VMs have a memory limit of 8G
DISABLE_SPRING: 1
services:
- docker
- redis
checkout:
post:
- ./bin/circle/merge-eyes-baselines:
- ./bin/circle/merge-base:
dependencies:
pre:
- ./bin/circle/install-circle-predependencies.sh
- google-chrome --version
- yarn --version
- node --version
- npm --version
cache_directories:
- "apps/node_modules"
- "dashboard/tmp/cache"
- ".tmputils"
- "~/.cache/yarn"
override:
# Install any dependencies not covered by rake install
# When installing moreutils, make sure it does not overwrite GNU parallel,
# which CircleCI uses to capture artifacts.
- sudo mv /usr/bin/parallel /usr/bin/gnu_parallel
- sudo apt-get install libicu-dev enscript moreutils pdftk
- sudo mv /usr/bin/gnu_parallel /usr/bin/parallel
# Use vendor/bundle path so gems will be cached correctly
- bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 --without ''
- |
echo "
bundler_use_sudo: false
npm_use_sudo: false
properties_encryption_key: $PROPERTIES_ENCRYPTION_KEY
applitools_eyes_api_key: $APPLITOOLS_KEY
saucelabs_username: $SAUCE_USERNAME
saucelabs_authkey: $SAUCE_ACCESS_KEY
ignore_eyes_mismatches: true
disable_all_eyes_running: true
firebase_name: $FIREBASE_NAME
firebase_secret: $FIREBASE_SECRET
use_my_apps: true
use_my_shared_js: true
build_blockly_core: true
build_shared_js: true
build_dashboard: true
build_pegasus: true
build_apps: true
localize_apps: true
dashboard_enable_pegasus: true
dashboard_workers: 5
skip_seed_all: true" >> locals.yml
- yarn version -V
# For install, increase default 10 minute timeout to 16 minutes (960s)
# We use ts to timestamp output lines
# We use mispipe instead of | to exit with the first step's exit code
# Run rake install
- mispipe "bundle exec rake install" "ts '[%Y-%m-%d %H:%M:%S]'":
environment:
RAKE_VERBOSE: true
timeout: 960
# For build, increase default 10 minute timeout to 24 minutes (1440s)
# Run rake build (twice in case of intermittent test failures within rake build)
# Each run has its own 13 minute timeout
# See notes above rake install for ts and mispipe reasoning
- ? |
for i in 1 2; do
mispipe "timeout 13m bundle exec rake build" "ts '[%Y-%m-%d %H:%M:%S]'" && break;
echo "rake build failed on attempt $i with error code $?";
done
:
timeout: 960
# Update firebase security rules and config params. If these security rules change in a
# non-backward-compatible way, this may cause a new test run to make an older one fail.
- bundle exec rake firebase:ci
# Make sure building did not introduce unexpected changes. If it did, fail
# here before we start running any test steps.
- bundle exec rake circle:check_for_unexpected_apps_changes
database:
override:
- 'echo "Skipping database phase (already ran)."'
test:
override:
- bundle exec rake lint:javascript:
timeout: 7200
- bundle exec rake circle:run_tests:
timeout: 7200
# Apply these settings late so they don't mess up unit tests
- |
echo "
use_dynamo_tables: false
use_dynamo_properties: false
no_https_store: true
override_dashboard: \"localhost-studio.code.org\"
override_pegasus: \"localhost.code.org\"
dashboard_port: 3000
pegasus_port: 3000
" >> locals.yml
- bundle exec rake circle:seed_ui_test:
timeout: 1000
- bundle exec rake circle:run_ui_tests:
timeout: 7200
- ./test.sh:
pwd:
cookbooks
experimental:
notify:
branches:
only:
- staging
deployment:
storybook:
branch: production
commands:
- 'cd apps && npm run storybook:deploy'