Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable testing for Windows platform #265

Merged
merged 6 commits into from Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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