Skip to content

Add IO#ttyname that returns the tty name or nil #1345

Add IO#ttyname that returns the tty name or nil

Add IO#ttyname that returns the tty name or nil #1345

Workflow file for this run

name: test
on:
push:
pull_request:
schedule:
- cron: '25 10 * * *'
workflow_dispatch:
jobs:
ruby-versions:
if: ${{ startsWith(github.repository, 'ruby/') || github.event_name != 'schedule' }}
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.6 # from `required_ruby_version` in io-console.gemspec
test:
needs: ruby-versions
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- ruby: jruby
- ruby: jruby-head
- ruby: truffleruby
- ruby: truffleruby-head
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- name: git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global advice.detachedHead 0
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
- name: Experiment with a manual bundle install
run: bundle install
- name: Run test
run: rake # Attempting without 'bundle exec'
continue-on-error: ${{matrix.ruby == 'truffleruby-head'}}
- id: build
run: |
rake build
echo "pkg=${GITHUB_REPOSITORY#*/}-${PLATFORM:-${RUNNING_OS%-*}}" >> $GITHUB_OUTPUT
env:
RUNNING_OS: ${{matrix.os}}
PLATFORM: ${{ startsWith(matrix.ruby, 'jruby') && 'java' || '' }}
if: >-
${{
github.event_name == 'push' &&
(matrix.ruby == needs.ruby-versions.outputs.latest || matrix.ruby == 'jruby-head')
}}
shell: bash
- name: Upload package
uses: actions/upload-artifact@v4
with:
path: pkg/*.gem
name: ${{steps.build.outputs.pkg}}
if: steps.build.outputs.pkg