Change default ruby parser to RDoc::Parser::PrismRuby #2481
Workflow file for this run
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: Test | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| - '!dependabot/**' | |
| pull_request: | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| ruby-versions: | |
| uses: ruby/actions/.github/workflows/ruby_versions.yml@master | |
| with: | |
| # 2.7 breaks `test_parse_statements_nodoc_identifier_alias_method` | |
| min_version: 3.0 | |
| engine: cruby-jruby | |
| versions: '["mswin"]' | |
| test: | |
| needs: ruby-versions | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }} | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| exclude: | |
| - os: windows-latest | |
| ruby: jruby | |
| - os: windows-latest | |
| ruby: jruby-head | |
| - os: macos-latest | |
| ruby: mswin | |
| - os: ubuntu-latest | |
| ruby: mswin | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true # 'bundle install' and cache | |
| - name: Verify generated parser files | |
| run: bundle exec rake verify_generated | |
| - name: Run test | |
| run: bundle exec rake | |
| env: | |
| RUBYOPT: --enable-frozen_string_literal | |
| - name: Run test with Ripper parser | |
| run: bundle exec rake | |
| env: | |
| RUBYOPT: --enable-frozen_string_literal | |
| RDOC_USE_RIPPER_PARSER: true | |
| - if: ${{ matrix.ruby == 'head' && startsWith(matrix.os, 'ubuntu') }} | |
| run: bundle exec rake rdoc | |
| - if: ${{ matrix.ruby == 'head' && startsWith(matrix.os, 'ubuntu') }} | |
| run: bundle exec rake install | |
| prism-version-test: | |
| needs: ruby-versions | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| prism_version: ['1.0.0', '1.3.0', '1.7.0', 'head'] | |
| runs-on: ubuntu-latest | |
| env: | |
| RUBYOPT: --enable-frozen_string_literal | |
| PRISM_VERSION: ${{matrix.prism_version}} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1.288.0 | |
| with: | |
| ruby-version: ${{ fromJson(needs.ruby-versions.outputs.latest) }} | |
| bundler-cache: true | |
| - name: Run test | |
| run: bundle exec rake |