完成したヤムルファイルは以下です。Rails プロジェクトなので、Gemfile とか RSpec とかの記述があります。 ポイントとしては、 vendor/bundle 以下をキャッシュする keys は複数渡せて、行頭一致で探してくれます。 ruby と mysql の接続は tcp DB_HOST: localhost とかすると UNIXソケット接続を試みて失敗します。 並列テストするために、テストファイルを split する デプロイのため、ssh-add しておく version: 2 jobs: build: docker: - image: ruby:2.3 environment: DB_HOST: 127.0.0.1 - image: mysql:5.6 environment: MYSQL_USER: root MYSQL_ALLOW_EMPTY_PASSWORD: