Add diagnostic output for Ruby 4.0 CI bundler debugging #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [master, 'fix/**', 'feature/**'] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby-version: ['3.2', '3.3', '3.4', '4.0'] | |
| name: Ruby ${{ matrix.ruby-version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Ruby ${{ matrix.ruby-version }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| bundler-cache: true | |
| - name: Debug bundler env | |
| run: | | |
| echo "=== Ruby & Bundler ===" | |
| ruby -v | |
| bundle -v | |
| echo "=== Key env vars ===" | |
| echo "GEM_HOME=$GEM_HOME" | |
| echo "GEM_PATH=$GEM_PATH" | |
| echo "BUNDLE_PATH=$BUNDLE_PATH" | |
| echo "BUNDLE_APP_CONFIG=$BUNDLE_APP_CONFIG" | |
| echo "BUNDLE_GEMFILE=$BUNDLE_GEMFILE" | |
| echo "=== Bundle config ===" | |
| bundle config list | |
| echo "=== Gem paths ===" | |
| ruby -e 'puts "Gem.dir=#{Gem.dir}"; puts "Gem.default_dir=#{Gem.default_dir}"; puts "Gem.user_dir=#{Gem.user_dir}"; puts "Gem.path=#{Gem.path}"' | |
| echo "=== Inside bundle exec ===" | |
| bundle exec ruby -e 'require "open3"; out,_=Open3.capture2e("ruby","-e","require %q(bundler); Bundler.with_original_env { puts %Q(orig GEM_HOME=\#{ENV[%q(GEM_HOME)]}) }; Bundler.with_unbundled_env { puts %Q(unbundled GEM_HOME=\#{ENV[%q(GEM_HOME)]}) }; puts %Q(Gem.default_dir=\#{Gem.default_dir})"); puts out' | |
| - name: Run tests | |
| run: bundle exec rspec |