Skip to content

Test

Test #2268

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: all
min_version: 2.6 # from `required_ruby_version` in io-console.gemspec
test:
needs: ruby-versions
strategy:
fail-fast: false
matrix:
ruby: ['head']
os: [ubuntu-latest]
include:
# - ruby: mswin
# os: windows-latest
# - ruby: jruby-head
# os: macos-15-intel
- ruby: cygwin
platform: cygwin
os: windows-latest
exclude:
- ruby: jruby
os: windows-latest
- ruby: jruby-head
os: windows-latest
- ruby: truffleruby
os: windows-latest
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
if: ${{ matrix.platform != 'cygwin' }}
- name: Set up Ruby Cygwin
id: cygwin-setup
uses: cygwin/cygwin-install-action@3f0a3f9f988f7e96b8c18098ae05eaec175f5b52 # v6.1
with:
packages: ruby gcc-core make libssl libyaml libffi zlib rubygems ruby-devel
site: |
https://cygwin.osuosl.org/
if: ${{ matrix.platform == 'cygwin' }}
- name: set path for cygwin
run: echo 'C:\cygwin\bin' >> %GITHUB_ENV%
if: ${{ steps.cygwin-setup.outcome == 'success' }}
- name: cygwin ruby version
run: |
where ruby bundle rake
ruby -v
bundle -v
rake --version
if: ${{ steps.cygwin-setup.outcome == 'success' }}
- name: Experiment with a manual bundle install
run: bundle install
- name: Run test
run: rake # Attempting without 'bundle exec'
timeout-minutes: 3
- 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@v7
with:
path: pkg/*.gem
name: ${{steps.build.outputs.pkg}}
if: steps.build.outputs.pkg