DEV Community 👩‍💻👨‍💻


Posted on • Originally published at on

[Ruby][Sorbet] How to check RBI file update omission with CI

Translate ja to en


bin/tapioca gems --verify
bin/tapioca dsl --verify
Enter fullscreen mode Exit fullscreen mode


bin/rails db:schema:load # ridgepoleを使っている場合にはridgepole --applyを。
bundle exec rake rails_rbi:all
git diff --exit-code --quiet
Enter fullscreen mode Exit fullscreen mode


bundle exec srb rbi sorbet-typed
bin/rails db:schema:load
bin/rails rails_rbi:all
bin/tapioca gem --workers=8
bin/tapioca todo
bundle exec srb rbi suggest-typed # コンフリクト解消をここで行ってから差分がでないことを確認する。こうしないとコンフリクト解消前の状態とコンフリクト解消後の状態の比較になってしまい差分が頻繁に発生する状態になってしまいほぼ常にCIで引っかかる状態になってしまう

git diff --exit-code --quiet
if [ $? -ne 0 ]; then
    echo "Please resolve the difference of RBI files"
    exit 1
Enter fullscreen mode Exit fullscreen mode


Top comments (0)

We are hiring! Do you want to be our Senior Platform Engineer? Are you capable of chipping in across sysadmin, ops, and site reliability work, while supporting the open source stack that runs DEV and other communities?

This role might just be for you!

Apply now