Skip to content

Commit

Permalink
Enable testing for Windows platform (#265)
Browse files Browse the repository at this point in the history
Merge pull request 265
  • Loading branch information
ashmaroli authored and jekyllbot committed Feb 28, 2019
1 parent 4372697 commit 1a3e417
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Gemfile
Expand Up @@ -4,3 +4,8 @@ source "https://rubygems.org"
gemspec

gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}" if ENV["JEKYLL_VERSION"]

install_if -> { Gem.win_platform? } do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end
23 changes: 23 additions & 0 deletions appveyor.yml
@@ -0,0 +1,23 @@
version: "{build}"
clone_depth: 5
build: off

environment:
NOKOGIRI_USE_SYSTEM_LIBRARIES: true
matrix:
- RUBY_FOLDER_VER: "26"
- RUBY_FOLDER_VER: "24"

install:
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%-x64\bin;%PATH%
- bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS% --clean --path vendor\bundle

test_script:
- ruby --version
- gem --version
- bundler --version
- bash ./script/test

cache:
# If one of the files after the right arrow changes, cache will be invalidated
- 'vendor\bundle -> appveyor.yml, Gemfile, jekyll-feed.gemspec'
1 change: 1 addition & 0 deletions spec/jekyll-feed_spec.rb
Expand Up @@ -205,6 +205,7 @@

context "validation" do
it "validates" do
skip "Typhoeus couldn't find the 'libcurl' module on Windows" if Gem.win_platform?
# See https://validator.w3.org/docs/api.html
url = "https://validator.w3.org/feed/check.cgi?output=soap12"
response = Typhoeus.post(url, :body => { :rawdata => contents }, :accept_encoding => "gzip")
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require "jekyll"
require "typhoeus"
require "typhoeus" unless Gem.win_platform?
require "nokogiri"
require "rss"
require File.expand_path("../lib/jekyll-feed", __dir__)
Expand Down

0 comments on commit 1a3e417

Please sign in to comment.