環境
masOS Monterey 12.3.1
エラー内容
プルリクエスト作成しGithub Actionsを走らせたところ、
"Run bundle exec rails test"フローにて以下のエラーが発生した。
Error: Process completed with exit code 1.
原因
"Run bundle exec rails test"フローのログを遡る。
Run bundle exec rails test
bundle exec rails test
shell: /usr/bin/bash -e {0}
(erb):33:in `<main>': Cannot load database configuration: (NameError)
uninitialized constant DB_PORT
直前に設定した環境変数を''で囲み忘れる初歩的ミスでした。
対処方法
環境変数を修正し再度 git commit
, git push
→ 無事にワークフロー通りました。
参考記事