Ruby on rails 循环Ci-并行运行rspec测试
我在circle ci中添加了一个额外的容器,并尝试以视差方式运行测试 这是我的Ruby on rails 循环Ci-并行运行rspec测试,ruby-on-rails,rspec,continuous-integration,circleci,Ruby On Rails,Rspec,Continuous Integration,Circleci,我在circle ci中添加了一个额外的容器,并尝试以视差方式运行测试 这是我的circle.yml文件 machine: ruby: version: 2.3.0 database: post: - cp config/sunspot.ci.yml config/sunspot.yml - bundle exec sunspot-solr start -p 8981 dependencies: pre: - sudo apt-get update;
circle.yml
文件
machine:
ruby:
version: 2.3.0
database:
post:
- cp config/sunspot.ci.yml config/sunspot.yml
- bundle exec sunspot-solr start -p 8981
dependencies:
pre:
- sudo apt-get update; sudo apt-get -y install solr-tomcat
test:
override:
- rvm use 2.3.0 && bundle exec rspec --color --format progress:
environment:
RAILS_ENV: test
parallel: true
files:
- "spec/**/*_spec.rb"
但测试似乎并没有并行运行。
我错过了什么?提前感谢出于某种原因从测试部分删除
rvm use 2.3.0
修复了我的问题
machine:
ruby:
version: 2.3.0
database:
# After default database task finished
post:
# Circle CI already replace our original sunspot.yml, replace it with backup copy `config/sunspot.yml.ci`
- cp config/sunspot.ci.yml config/sunspot.yml
- bundle exec sunspot-solr start -p 8981
dependencies:
pre:
- sudo apt-get update; sudo apt-get -y install solr-tomcat
test:
override:
- bundle exec rspec --tag ~@flaky --color --profile 20 --format progress:
timeout: 240
environment:
RAILS_ENV: test
parallel: true
files:
- my files here
我也有同样的问题。。最后,我把测试部分的所有内容都保留了下来,它以某种方式自动工作了。。