Skip to content

Commit

Permalink
Migrate Windows CI to Github Actions
Browse files Browse the repository at this point in the history
I needed to workaround one test because on the Github Actions
environment, the test path is not the last feature to have been loaded.
The test is only concerned with it having been loaded, no matter in
which position, so adapt the assertion.
  • Loading branch information
deivid-rodriguez committed Apr 12, 2020
1 parent 24b3313 commit f4d0f35
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 60 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -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' }}
59 changes: 0 additions & 59 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion test/runner_against_valid_program_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_run_with_require_flag
stdout = run_byebug(
"-r", example_path, example_path,
input: \
"puts \"Example path loaded? \#{$LOADED_FEATURES.last == '#{example_path}'}\""
"puts \"Example path loaded? \#{$LOADED_FEATURES.include?('#{example_path}')}\""
)

assert_match(/Example path loaded\? true/, stdout)
Expand Down

0 comments on commit f4d0f35

Please sign in to comment.