Closed junohm410 closed 2 months ago
試しにCI設定ファイルを書いてみたところ、net-popのダウンロードでエラーが発生。
Downloading net-pop-0.1.2 revealed dependencies not in the API or the lockfile
(net-protocol (>= 0)).
Running `bundle update net-pop` should fix the problem.
Error: The process '/opt/hostedtoolcache/Ruby/3.3.3/x64/bin/bundle' failed with exit code 34
name: "test"
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: assets precompile
run: bundle exec rake assets:precompile
- name: Set up database schema
run: bin/rails db:schema:load
- name: Run tests
run: bundle exec rspec
Rubyのバージョンの問題と思われるので、まずはそちらの対応を行う。 Ruby 3.3.3にアップグレードするとbundle installでnet-popがインストールできない|TechRacho by BPS株式会社
テストとLintについて、それぞれ以下のPRで設定を行った。
次のプラクティスを参考に、CI環境を整える。 サービスはGitHub Actionsを使う。
プラクティス CI | FBC