summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-01 21:39:16 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2020-01-04 22:17:49 +0100
commit9291a99f9a16e1604e8a9e2990f3bdc3f920e451 (patch)
tree5bcaf1e6dca6a662206d1cfe475ee6249df2ffca
parent53725128cf6559d571a07969c9cdbc36bdea76f0 (diff)
downloadbundler-9291a99f9a16e1604e8a9e2990f3bdc3f920e451.tar.gz
Migrate Windows CI to Github actions
-rw-r--r--.azure-pipelines/patch_readline.sh3
-rw-r--r--.azure-pipelines/rbreadline.diff41
-rw-r--r--.azure-pipelines/steps.yml33
-rw-r--r--.github/workflows/windows.yml34
-rw-r--r--azure-pipelines.yml18
5 files changed, 34 insertions, 95 deletions
diff --git a/.azure-pipelines/patch_readline.sh b/.azure-pipelines/patch_readline.sh
deleted file mode 100644
index 69bf661a1b..0000000000
--- a/.azure-pipelines/patch_readline.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-ruby_version=$(ruby -e 'puts RUBY_VERSION')
-
-git apply --ignore-space-change --ignore-whitespace '.azure-pipelines\rbreadline.diff' --directory="C:/hostedtoolcache/windows/Ruby/$ruby_version/x64/lib/ruby/site_ruby" --unsafe-paths
diff --git a/.azure-pipelines/rbreadline.diff b/.azure-pipelines/rbreadline.diff
deleted file mode 100644
index c139577610..0000000000
--- a/.azure-pipelines/rbreadline.diff
+++ /dev/null
@@ -1,41 +0,0 @@
-diff --git a/rbreadline.rb b/rbreadline.rb
-index c710961..e35408c 100644
---- a/rbreadline.rb
-+++ b/rbreadline.rb
-@@ -16,6 +16,7 @@ end
-
- module RbReadline
- require 'etc'
-+ require 'io/console'
-
- RL_LIBRARY_VERSION = "5.2"
- RL_READLINE_VERSION = 0x0502
-@@ -1092,6 +1093,9 @@ module RbReadline
- @current_readline_init_include_level = 0
- @current_readline_init_lineno = 0
-
-+ # Used in windows
-+ @is_pipe = false
-+
- ENV["HOME"] ||= "#{ENV["HOMEDRIVE"]}#{ENV["HOMEPATH"]}"
- if !File.directory? ENV["HOME"]
- raise RuntimeError.new("HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory")
-@@ -4490,6 +4494,10 @@ module RbReadline
- end
-
- def rl_getc(stream)
-+ # below added as test for whether we're connected to a pipe or a keyboard.
-+ # Pipe connection is probably running under a test suite.
-+ return (stream.getc || EOF rescue EOF) if @is_pipe
-+
- while (@kbhit.Call == 0)
- # If there is no input, yield the processor for other threads
- sleep(@_keyboard_input_timeout)
-@@ -4740,6 +4748,7 @@ module RbReadline
- def readline_internal_charloop()
- lastc = -1
- eof_found = false
-+ @is_pipe = (!@rl_outstream.winsize rescue true)
-
- while (!@rl_done)
- lk = @_rl_last_command_was_kill
diff --git a/.azure-pipelines/steps.yml b/.azure-pipelines/steps.yml
deleted file mode 100644
index 50e13fb499..0000000000
--- a/.azure-pipelines/steps.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-steps:
-
-- task: UseRubyVersion@0
- inputs:
- versionSpec: '= 2.6'
-
-- script: |
- ruby -v
- ridk version
- displayName: 'ruby -v + ridk version'
-
-- script: |
- bash .azure-pipelines\patch_readline.sh
- displayName: 'patch local readline implementation (for https://github.com/bundler/bundler/issues/6907)'
-
-- script: |
- ruby bin/rake spec:deps
- displayName: 'ruby bin/rake spec:deps'
-
-- script: |
- gem install --no-document --conservative rspec_junit_formatter
- displayName: 'gem install rspec_junit_formatter'
-
-- script: |
- ruby -r rspec_junit_formatter bin/rspec --format RspecJunitFormatter -o rspec/bundler-junit-results.xml || exit 0
- displayName: 'ruby bin/rspec'
-
-- task: PublishTestResults@2
- inputs:
- testRunner: JUnit
- testResultsFiles: rspec/bundler-junit-results.xml
- displayName: Publish test results
- condition: succeededOrFailed()
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 0000000000..f1538cff97
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,34 @@
+name: windows
+
+on:
+ pull_request:
+
+ push:
+ branches:
+ - staging
+ - trying
+
+jobs:
+ windows:
+ runs-on: windows-latest
+
+ strategy:
+ matrix:
+ ruby: [ '2.4.x', '2.5.x', '2.6.x' ]
+
+ steps:
+ - uses: actions/checkout@v1
+
+ - name: Setup ruby
+ uses: actions/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+
+ - name: Install dependencies
+ run: bin/rake spec:deps
+ shell: bash
+
+ - name: Run specs
+ run: bin/rspec
+ shell: bash
+ continue-on-error: true
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 309e644487..0000000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-trigger:
- branches:
- include:
- - master
- - staging
- - trying
- - /.+-dev$/
- - /.+-stable$/
-
-jobs:
-- job: Windows
- pool:
- vmImage: 'vs2017-win2016'
- variables:
- rgv: v3.0.6
- steps:
- - template: .azure-pipelines/steps.yml
- timeoutInMinutes: 0