diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..0ff276b70 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,62 @@ +--- + +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: Clone patched rb-readline + shell: cmd + run: git clone -q --depth=5 --no-tags --branch=byebug https://github.com/deivid-rodriguez/rb-readline.git C:\rb-readline + + - name: Install patched rb-readline + run: | + $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: Display environment information + shell: cmd + run: | + echo %PATH% + + ruby --version + where ruby + + gem --version + where gem + + bash --version + where bash + + - name: Setup dependencies + shell: bash + run: bin/setup.sh + + - name: Run tests + run: ruby bin/rake compile test + continue-on-error: ${{ matrix.version == 'head' }} diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 18a4e3108..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- - -install: - - set PATH=C:\Ruby%ruby_version%\bin;C:\Program Files\Git\cmd;C:/Windows/system32;C:\Program Files\Git\usr\bin - - - ps: | - if ($env:ruby_version -like "*head*") { - $(new-object net.webclient).DownloadFile("https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-head/rubyinstaller-$env:ruby_version.exe", "$pwd/ruby-setup.exe") - cmd /c ruby-setup.exe /verysilent /dir=C:/Ruby$env:ruby_version - } - - - git clone -q --depth=5 --no-tags --branch=byebug https://github.com/deivid-rodriguez/rb-readline.git C:\rb-readline - - - ps: $env:ruby_abi_vers = (&ruby.exe -e "puts RbConfig::CONFIG['ruby_version']" | Out-String).Trim() - - set n_dir=C:\Ruby%ruby_version%\lib\ruby\site_ruby\%ruby_abi_vers% - - attrib.exe -r %n_dir%\*.rb - - del /q %n_dir%\readline.rb - - del /q %n_dir%\rbreadline.rb - - copy C:\rb-readline\lib\readline.rb %n_dir%\readline.rb - - copy C:\rb-readline\lib\rbreadline.rb %n_dir%\rbreadline.rb - - - echo %PATH% - - - ruby --version - - where ruby - - - gem --version - - where gem - - - bash --version - - where bash - -build_script: - - bash -lc bin/setup.sh - -test_script: - - ruby bin/rake compile test - -environment: - matrix: - - ruby_version: 24-x64 - - ruby_version: 25-x64 - - ruby_version: 26-x64 - - ruby_version: head-x64 - -cache: - - .bundle - -matrix: - allow_failures: - - ruby_version: head-x64 - -branches: - only: - - master - -notifications: - - provider: Email - - on_build_success: false - on_build_failure: false - on_build_status_changed: true diff --git a/test/runner_against_valid_program_test.rb b/test/runner_against_valid_program_test.rb index a20fef9a7..9555ccfba 100644 --- a/test/runner_against_valid_program_test.rb +++ b/test/runner_against_valid_program_test.rb @@ -84,10 +84,10 @@ def test_run_with_require_flag stdout = run_byebug( "-r", example_path, example_path, input: \ - "puts \"Abbrev loaded? \#{$LOADED_FEATURES.last == '#{example_path}'}\"" + "puts \"Example path loaded? \#{$LOADED_FEATURES.include?('#{example_path}')}\"" ) - assert_match(/Abbrev loaded\? true/, stdout) + assert_match(/Example path loaded\? true/, stdout) end def test_run_with_a_single_include_flag