Skip to content

Commit

Permalink
Merge pull request #14676 from code-dot-org/fix-js-tests-timing-out
Browse files Browse the repository at this point in the history
Fix apps tests timing out on Circle CI
  • Loading branch information
islemaster committed Apr 26, 2017
2 parents 7173fe2 + cc4ee22 commit 1c035f5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/cdo/test_run_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module TestRunUtils
def self.run_apps_tests
Dir.chdir(apps_dir) do
ChatClient.wrap('apps tests') do
RakeUtils.system 'npm run test-low-memory'
RakeUtils.system_stream_output 'npm run test-low-memory'
end
end
end
Expand Down
3 changes: 3 additions & 0 deletions lib/rake/build.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ namespace :build do
# Workaround for https://github.com/sass/node-sass/issues/1804
RakeUtils.npm_rebuild 'node-sass'

# Workaround for https://github.com/karma-runner/karma-phantomjs-launcher/issues/120
RakeUtils.npm_rebuild 'phantomjs-prebuilt'

if rack_env?(:staging)
ChatClient.log 'Updating <b>apps</b> i18n strings...'
RakeUtils.system './sync-apps.sh'
Expand Down
7 changes: 7 additions & 0 deletions lib/rake/circle.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ require 'json'
# Run all unit/integration tests, not just a subset based on changed files.
RUN_ALL_TESTS_TAG = 'test all'.freeze

# Only run apps tests on container 0
RUN_APPS_TESTS_TAG = 'test apps'.freeze

# Don't run any UI or Eyes tests.
SKIP_UI_TESTS_TAG = 'skip ui'.freeze

Expand Down Expand Up @@ -50,6 +53,10 @@ namespace :circle do
if CircleUtils.tagged?(RUN_ALL_TESTS_TAG)
ChatClient.log "Commit message: '#{CircleUtils.circle_commit_message}' contains [#{RUN_ALL_TESTS_TAG}], force-running all tests."
RakeUtils.rake_stream_output 'test:all'
elsif CircleUtils.tagged?(RUN_APPS_TESTS_TAG)
ChatClient.log "Commit message: '#{CircleUtils.circle_commit_message}' contains [#{RUN_APPS_TESTS_TAG}], force-running apps tests."
RakeUtils.rake_stream_output 'test:apps'
RakeUtils.rake_stream_output 'test:changed:all_but_apps'
else
RakeUtils.rake_stream_output 'test:changed'
end
Expand Down
18 changes: 11 additions & 7 deletions lib/rake/test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,17 @@ namespace :test do
end
end

task all: [:apps,
# currently disabled because these tests take too long to run on circle
# :interpreter,
:dashboard,
:pegasus,
:shared,
:lib]
all_tasks = [:apps,
# currently disabled because these tests take too long to run on circle
# :interpreter,
:dashboard,
:pegasus,
:shared,
:lib]

task all_but_apps: all_tasks.reject {|t| t == :apps}

task all: all_tasks
end

task changed: ['changed:all']
Expand Down

0 comments on commit 1c035f5

Please sign in to comment.