Enable break_on_newline extension by default for Markdown #257
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: RI Backward Compatibility | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| - '!dependabot/**' | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| ri-backward-compat: | |
| name: RI reads data generated by RDoc ${{ matrix.old_rdoc }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| old_rdoc: ['6.5.0', '6.9.0', '7.0.2'] | |
| runs-on: ubuntu-latest | |
| env: | |
| RI_DATA_DIR: /tmp/ri_data | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@3ff19f5e2baf30647122352b96108b1fbe250c64 # v1.299.0 | |
| with: | |
| # Must use Ruby 3.x — on Ruby 4.0, Heading is always a Class while old | |
| # RDoc versions serialized it as a Struct, so the test would always fail | |
| # regardless of whether the current code is correct. | |
| ruby-version: '3.4' | |
| - name: Generate ri data with old RDoc | |
| run: | | |
| gem install rdoc -v ${{ matrix.old_rdoc }} --no-document | |
| ruby -e ' | |
| gem "rdoc", "${{ matrix.old_rdoc }}" | |
| require "rdoc/rdoc" | |
| puts "Generating ri data with RDoc #{RDoc::VERSION}" | |
| RDoc::RDoc.new.document(["--ri", "--op", ENV["RI_DATA_DIR"], "--quiet", "lib/"]) | |
| ' | |
| - name: Install current RDoc | |
| run: | | |
| gem build rdoc.gemspec | |
| gem install rdoc-*.gem --no-document | |
| - name: Verify current ri can read old data | |
| run: | | |
| ruby -e ' | |
| require "rdoc" | |
| puts "Reading ri data with RDoc #{RDoc::VERSION}" | |
| store = RDoc::Store.new(RDoc::Options.new, path: ENV["RI_DATA_DIR"], type: :extra) | |
| store.load_cache | |
| modules = store.module_names | |
| errors = [] | |
| modules.each do |mod_name| | |
| store.load_class(mod_name) | |
| rescue => e | |
| errors << [mod_name, e] | |
| warn "FAIL: #{mod_name} - #{e.class}: #{e.message}" | |
| end | |
| if errors.empty? | |
| puts "All #{modules.size} modules loaded successfully" | |
| else | |
| abort "#{errors.size} of #{modules.size} modules failed to load" | |
| end | |
| ' |