Это первый раз, когда мы пытаемся запустить тесты с веб-упаковщиком, компилирующим приложение Vuejs. Сборка зависает в веб-пакере: шаг компиляции, а затем время ожидания с этим сообщением:
Too long with no output (exceeded 35m0s)Too long with no output (exceeded 35m0s)
Время ожидания по умолчанию составило 10 минут, мы подумали, что этого может быть недостаточно, и увеличили его до 35 минут, но все равно не удается,На локальном хосте компиляция с NODE_ENV = test и RAILS_ENV = test занимает менее 20 секунд. Мы используем rspec и capybara для тестов.
Мы успешно запускаем webpacker на heroku, хотя время компиляции длинное (6-7 минут), он все еще заканчивается. У кого-нибудь были такие или похожие проблемы? Просьба помочь решить.
Rails 4.2.10
webpacker 4.0.7
circleci config:
version: 2
jobs:
build:
working_directory: ~/judgeme/judgeme
parallelism: 1
shell: /bin/bash --login
environment:
RAILS_ENV: test
RACK_ENV: test
NODE_ENV: test
#some other variables in here
docker:
- image: circleci/ruby:2.4.4-node-browsers
environment: # environment variables for primary container
BUNDLE_JOBS: 3
BUNDLE_RETRY: 3
BUNDLE_PATH: vendor/bundle
PGHOST: 127.0.0.1
PGUSER: judgeme-test
RAILS_ENV: test
- image: circleci/postgres:9.5-alpine-ram # database image
environment: # environment variables for database
POSTGRES_USER: judgeme-test
POSTGRES_DB: judgeme_test
POSTGRES_PASSWORD: ""
- image: redis
- image: docker.elastic.co/elasticsearch/elasticsearch:6.0.1
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# Restore bundle cache
- restore_cache:
keys:
# - rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
- rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
# This branch if available
- v1-dep-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
# Default branch if not
- v1-dep-master-{{ checksum "Gemfile.lock" }}
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v1-dep-{{ checksum "Gemfile.lock" }}
- run:
name: Bundle gems
command: 'bundle check --path=vendor/bundle || bundle install --path=vendor/bundle'
# Store bundle cache
- save_cache:
# key: rails-demo-bundle-v2-{{ checksum "Gemfile.lock" }}
key: v1-dep-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.bundle
- run:
name: Wait for DB
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Wait for ElasticSearch
command: dockerize -wait tcp://127.0.0.1:9200/ -timeout 1m
- run:
name: Database setup
command: bundle exec rake db:schema:load --trace
- restore_cache:
keys:
- yarn-{{ checksum "yarn.lock" }}
- run:
name: Yarn install
command: yarn install --cache-folder ~/.cache/yarn
# save yarn cache
- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- restore_cache:
keys:
- webpack-{{ .Revision }}
- run:
name: Compile webpacker assets
command: bundle exec rake webpacker:compile
no_output_timeout: 35m
- save_cache:
key: webpack-{{ .Revision }}
paths:
- /home/circleci/project/public/packs-test/
- run:
name: Run rspec with integrations tests at last
command: |
bundle exec rspec --profile 10 --format progress \
spec/controllers \
spec/jobs \
spec/mailers \
spec/models \
spec/policies \
spec/queries \
spec/services \
spec/integrations \
spec
no_output_timeout: 3600s
# Save test results for timing analysis
- store_test_results:
path: test_results
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results
webpacker.yml:
default: &default
source_path: app/javascript
source_entry_path: packs
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: false
resolved_paths: []
cache_manifest: false
extract_css: false
static_assets_extensions:
- .jpg
- .jpeg
- .png
- .gif
- .tiff
- .ico
- .svg
- .eot
- .otf
- .ttf
- .woff
- .woff2
extensions:
- .erb
- .vue
- .mjs
- .js
- .sass
- .scss
- .css
- .module.sass
- .module.scss
- .module.css
- .png
- .svg
- .gif
- .jpeg
- .jpg
development:
<<: *default
compile: true
check_yarn_integrity: true
dev_server:
https: false
host: localhost
port: 3035
public: localhost:3035
hmr: false
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: '**/node_modules/**'
test:
<<: *default
compile: false
public_output_path: packs-test
production:
<<: *default
compile: false
extract_css: true
cache_manifest: true