Skip to content

[Idea] Use latest stable ruby if no with - ruby-version specified #364

@ShockwaveNN

Description

@ShockwaveNN

I got a little idea - I got a little CI task that check that yardoc are generating correct and full documentation for my gem

I don't need any specific version of ruby in this task, so I fought if I init CI task with this config:

name: Documentation
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up latest ruby
        uses: ruby/setup-ruby@v1
      - name: Install gem dependencies
        run: |
          gem install bundler
          bundle install --jobs 4 --retry 3
      - name: Check that yardoc is correct
        run: yardoc . --fail-on-warning > yardoc.log
      - name: Check that code 100% documented
        run: cat yardoc.log | grep -q '100.00% documented'

It will be using the latest stable ruby (since I don't specify any)

But instead, this task failed with

Run ruby/setup-ruby@v1
Error: Error: input ruby-version needs to be specified if no .ruby-version or .tool-versions file exists

This error is 100% clear for me, but maybe this behavior should be reconsidered and in that case -just latest stable ruby should be used, like v3.1 right now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions