name: Windows
on: [push, pull_request]
jobs:
  build:
    name: build (windows, ${{ matrix.ruby }})
    strategy:
      fail-fast: false
      matrix:
        ruby: [ '2.4.x', '2.5.x', '2.6.x' ]
    runs-on: windows-latest
    steps:
      - name: git config autocrlf
        run: git config --global core.autocrlf false
      - uses: actions/checkout@master
      - name: Install Ruby
        uses: MSP-Greg/actions-ruby@master
        with:
          ruby-version: ${{ matrix.ruby }}
      - name: Clone MSpec
        run: git clone https://github.com/ruby/mspec.git ../mspec
      - name: Run specs
        env:
          CHECK_LEAKS: true
        run: |
          # Actions uses UTF8, causes test failures, similar to normal OS setup
          [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
          [Console]::InputEncoding  = [System.Text.Encoding]::GetEncoding("IBM437")
          ../mspec/bin/mspec -j

name: Windows
on: [push, pull_request]
jobs:
  build:
    name: build (windows, ${{ matrix.ruby }})
    strategy:
      fail-fast: false
      matrix:
        ruby: [ '2.4.x', '2.5.x', '2.6.x', '2.7.x' ]
    runs-on: windows-latest
    steps:
      - name: git config autocrlf
        run: git config --global core.autocrlf false
      - uses: actions/checkout@master
      - name: Install Ruby
        uses: MSP-Greg/actions-ruby@master
        with:
          ruby-version: ${{ matrix.ruby }}
      - name: Clone MSpec
        run: git clone https://github.com/ruby/mspec.git ../mspec
      - name: Run specs
        env:
          CHECK_LEAKS: true
        run: |
          # Actions uses UTF8, causes test failures, similar to normal OS setup
          [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437")
          [Console]::InputEncoding  = [System.Text.Encoding]::GetEncoding("IBM437")
          ../mspec/bin/mspec -j

Test Ruby 2.7 on Windows too
Test Ruby 2.7 on Windows too
