---

name: windows

on:
  pull_request:

  push:
    branches:
      - master

jobs:
  test:
    runs-on: windows-2019

    strategy:
      matrix:
        version: [2.4.9, 2.5.7, 2.6.5, head]

    steps:
      - uses: actions/checkout@v2

      - uses: actions/cache@v1
        with:
          path: .bundle
          key: gems-${{ hashFiles('**/Gemfile.lock') }}

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.version }}

      - name: Patch rb-readline
        run: |
          git clone -q --depth=5  --no-tags --branch=byebug https://github.com/deivid-rodriguez/rb-readline.git C:\rb-readline
          $env:n_dir = (&ruby.exe -e "puts RbConfig::CONFIG['sitelibdir']" | Out-String).Trim()
          Copy-Item -Path C:\rb-readline\lib\readline.rb -Destination $env:n_dir\readline.rb
          Copy-Item -Path C:\rb-readline\lib\rbreadline.rb -Destination $env:n_dir\rbreadline.rb

      - name: Setup dependencies
        shell: bash
        run: bin/setup.sh

      - name: Run tests
        run: ruby bin/rake compile test
        continue-on-error: ${{ matrix.version == 'head' }}

---

name: windows

on:
  pull_request:

  push:
    branches:
      - master

jobs:
  test:
    runs-on: windows-2019

    strategy:
      matrix:
        version: [2.4.9, 2.5.7, 2.6.5, head]

    steps:
      - uses: actions/checkout@v2

      - uses: actions/cache@v1
        with:
          path: .bundle
          key: gems-${{ hashFiles('**/Gemfile.lock') }}

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.version }}

      - name: Patch rb-readline
        run: |
          git clone -q --depth=5  --no-tags --branch=byebug https://github.com/deivid-rodriguez/rb-readline.git C:\rb-readline
          $env:n_dir = $(ruby.exe -e "print RbConfig::CONFIG['sitelibdir']")
          Copy-Item -Path C:\rb-readline\lib\readline.rb -Destination $env:n_dir\readline.rb
          Copy-Item -Path C:\rb-readline\lib\rbreadline.rb -Destination $env:n_dir\rbreadline.rb

      - name: Setup dependencies
        shell: bash
        run: bin/setup.sh

      - name: Run tests
        run: ruby bin/rake compile test
        continue-on-error: ${{ matrix.version == 'head' }}

Use `print`, so we don't need to trim the output
Use `print`, so we don't need to trim the output
