Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,47 @@ begin
raise "Spec run failed, please review the log for more information"
end
end

desc "Run the tests on Appveyor against a rubygem version (using ENV['RGV'])"
task :appveyor do
rg = ENV["RGV"] || raise("Rubygems version is required on Appveyor!")

if RUBY_VERSION > "1.9.3"
puts "\nRunning bundler linter:\n\n"
Rake::Task["rubocop"].invoke
end

puts "\nRunning bundler specs against rubygems #{rg}\n\n"
specs = safe_task { Rake::Task["spec:rubygems:#{rg}"].invoke }
puts "=====#{specs}======"

Rake::Task["spec:rubygems:#{rg}"].reenable

puts "\nRunning bundler sudo specs against rubygems #{rg}\n\n"
sudos = system("sudo -E rake spec:rubygems:#{rg}:sudo")
puts "=====#{sudos}======"

# clean up by chowning the newly root-owned tmp directory back to the travis user
# system("sudo chown -R #{ENV["USER"]} #{File.join(File.dirname(__FILE__), "tmp")}")

Rake::Task["spec:rubygems:#{rg}"].reenable

puts "\nRunning bundler real world specs against rubygems #{rg}\n\n"
realworld = safe_task { Rake::Task["spec:rubygems:#{rg}:realworld"].invoke }
puts "=====#{realworld}======"

{ "specs" => specs, "sudo" => sudos, "realworld" => realworld }.each do |name, passed|
if passed
puts "#{name} passed"
else
puts "#{name} failed"
end
end

unless specs && sudos && realworld
raise "Spec run failed, please review the log for more information"
end
end
end

rescue LoadError
Expand Down
131 changes: 131 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
version: "{build}"
skip_tags: true
branches:
only:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs to build stable

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, gotcha. Just a heads-up, this is a work-in-progress PR since I'm pushing stuff to the PR and experimenting/fixing errors as Appveyor reports them in the builds. They do seem to support local testing in the same way you can work with Travis builds in a local container but I'd need to boot up a Windows VM so this seems easier.

- master
- auto
- /.+-stable$/
on_finish:
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- ruby --version
- gem --version
- rake spec:deps
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bin/rake

test_script:
- rake spec:appveyor

build: off
environment:
matrix:
# Ruby 2.2, Rubygems 2.4.5 and up
# - ruby_version: "22"
# RGV: master
# - ruby_version: "22-x64"
# RGV: master
# - ruby_version: "22"
# RGV: v2.5.2
# - ruby_version: "22-x64"
# RGV: v2.5.2
- ruby_version: "22"
RGV: v2.4.8
# - ruby_version: "22-x64"
# RGV: v2.4.8

# # Ruby 2.1, Rubygems 2.2.2 and up
# - ruby_version: "21"
# RGV: v2.2.5
# - ruby_version: "21-x64"
# RGV: v2.2.5

# # Ruby 2.0.0, Rubygems 2.0.0 and u
# - ruby_version: "200"
# RGV: v2.2.5
# - ruby_version: "200-x64"
# RGV: v2.2.5
# - ruby_version: "200"
# RGV: v2.1.11
# - ruby_version: "200-x64"
# RGV: v2.1.11
# - ruby_version: "200"
# RGV: v2.0.14
# - ruby_version: "200-x64"
# RGV: v2.0.14

# # Ruby 1.9.3, Rubygems 1.5.3 and up
# - ruby_version: "193"
# RGV: v2.2.5
# - ruby_version: "193-x64"
# RGV: v2.2.5
# - ruby_version: "193"
# RGV: v2.1.11
# - ruby_version: "193-x64"
# RGV: v2.1.11
# - ruby_version: "193"
# RGV: v2.0.14
# - ruby_version: "193-x64"
# RGV: v2.0.14
# - ruby_version: "193"
# RGV: v1.8.29
# - ruby_version: "193-x64"
# RGV: v1.8.29
# - ruby_version: "193"
# RGV: v1.7.2
# - ruby_version: "193-x64"
# RGV: v1.7.2
# - ruby_version: "193"
# RGV: v1.6.2
# - ruby_version: "193-x64"
# RGV: v1.6.2
# - ruby_version: "193"
# RGV: v1.5.3
# - ruby_version: "193-x64"
# RGV: v1.5.3

# # Ruby 1.8.7, Rubygems 1.3.6 and up
# - ruby_version: "187"
# RGV: v2.2.5
# - ruby_version: "187-x64"
# RGV: v2.2.5
# - ruby_version: "187"
# RGV: v2.0.14
# - ruby_version: "187-x64"
# RGV: v2.0.14
# - ruby_version: "187"
# RGV: v1.8.29
# - ruby_version: "187-x64"
# RGV: v1.8.29
# - ruby_version: "187"
# RGV: v1.7.2
# - ruby_version: "187-x64"
# RGV: v1.7.2
# - ruby_version: "187"
# RGV: v1.6.2
# - ruby_version: "187-x64"
# RGV: v1.6.2
# - ruby_version: "187"
# RGV: v1.5.3
# - ruby_version: "187-x64"
# RGV: v1.5.3
# - ruby_version: "187"
# RGV: v1.4.2
# - ruby_version: "187-x64"
# RGV: v1.4.2
# - ruby_version: "187"
# RGV: v1.3.7
# - ruby_version: "187-x64"
# RGV: v1.3.7
# - ruby_version: "187"
# RGV: v1.3.6
# - ruby_version: "187-x64"
# RGV: v1.3.6

# # Ruby-head (we want to know how we're doing, but not fail the build)
# # - rvm: ruby-head
# # RGV: master

# - ruby_version: "187"
# RGV: v2.1.11
# - ruby_version: "187-x64"
# RGV: v2.1.11