毎回bundle installするのはコストがかかるため、Gemfileに変更がない場合はキャッシュしたい。
参考 https://blog.freks.jp/github-action-cache/
+ - name: cache bundle directory
+ uses: actions/cache@v1
+ with:
+ path: vendor/bundle
+ key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
bundle installする手前のstepに挟むだけで動作する。