I have a repo which is new enough that it was never set up with the 1.0-style circle.yml - it has always had .circle/config.yml. I have just noticed that this entire time it has been running (and passing) as 1.0. I have checked and double-checked that no 1.0-style circle.yml exists in my project. I am not sure how to debug this and I don’t understand why this is happening. Here is my .circle/config.yml for reference in case I have done anything wrong. I am using almost the exact same file on another project (just with the DB names changed) and it runs properly as 2.0 there.
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.4-stretch-node-browsers
environment:
- PGHOST: 127.0.0.1
- PGUSER: myapp
- RAILS_ENV: test
- image: circleci/postgres:9.4
environment:
- POSTGRES_USER: myapp
- POSTGRES_DB: myapp_db_test
- POSTGRES_PASSWORD: ""
working_directory: ~/repo
steps:
- checkout
- restore_cache:
name: Restore cache
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
- v1-dependencies-
- run:
name: Install dependencies
command: |
bundle install --jobs=4 --retry=3 --path vendor/bundle
- save_cache:
name: Save cache
paths:
- ./vendor/bundle
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
- run:
name: Database setup
command: |
bundle exec rake db:create
bundle exec rake db:schema:load
- run:
name: Rspec
command: |
mkdir /tmp/test-results
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
bundle exec rspec --format progress \
--format RspecJunitFormatter \
--out /tmp/test-results/rspec.xml \
--format progress \
$TEST_FILES
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results