parent
f00a642901
commit
275702edd5
|
@ -0,0 +1 @@
|
||||||
|
* text=auto
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: Continuous Integration
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- /.*-stable/
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- /.*-stable/
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
name: 'SUITE: ${{ matrix.test_suite }} / OS: ${{ matrix.os }}'
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
test_suite:
|
||||||
|
- test
|
||||||
|
- default-site
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- name: Set up Ruby 2.6
|
||||||
|
uses: actions/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6.x
|
||||||
|
- name: 'Update Rubygems & Bundler'
|
||||||
|
run: 'gem update --system --no-document && gem update bundler --no-document'
|
||||||
|
- name: Set up bundle
|
||||||
|
run: bundle install --jobs 4 --retry 3
|
||||||
|
- name: Run Test Suite
|
||||||
|
run: bash script/cibuild
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
TEST_SUITE: ${{ matrix.test_suite }}
|
|
@ -80,6 +80,17 @@ module DirectoryHelpers
|
||||||
def test_dir(*subdirs)
|
def test_dir(*subdirs)
|
||||||
root_dir("test", *subdirs)
|
root_dir("test", *subdirs)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def temp_dir(*subdirs)
|
||||||
|
if Utils::Platforms.windows?
|
||||||
|
drive = Dir.pwd.sub(%r!^([^\/]+).*!, '\1')
|
||||||
|
temp_root = File.join(drive, "tmp")
|
||||||
|
else
|
||||||
|
temp_root = "/tmp"
|
||||||
|
end
|
||||||
|
|
||||||
|
File.join(temp_root, *subdirs)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class JekyllUnitTest < Minitest::Test
|
class JekyllUnitTest < Minitest::Test
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
* -text
|
|
@ -32,7 +32,7 @@ class TestSite < JekyllUnitTest
|
||||||
|
|
||||||
should "have an array for plugins if passed as a string" do
|
should "have an array for plugins if passed as a string" do
|
||||||
site = Site.new(site_configuration("plugins_dir" => "/tmp/plugins"))
|
site = Site.new(site_configuration("plugins_dir" => "/tmp/plugins"))
|
||||||
array = Utils::Platforms.windows? ? ["C:/tmp/plugins"] : ["/tmp/plugins"]
|
array = [temp_dir("plugins")]
|
||||||
assert_equal array, site.plugins
|
assert_equal array, site.plugins
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -40,11 +40,7 @@ class TestSite < JekyllUnitTest
|
||||||
site = Site.new(site_configuration(
|
site = Site.new(site_configuration(
|
||||||
"plugins_dir" => ["/tmp/plugins", "/tmp/otherplugins"]
|
"plugins_dir" => ["/tmp/plugins", "/tmp/otherplugins"]
|
||||||
))
|
))
|
||||||
array = if Utils::Platforms.windows?
|
array = [temp_dir("plugins"), temp_dir("otherplugins")]
|
||||||
["C:/tmp/plugins", "C:/tmp/otherplugins"]
|
|
||||||
else
|
|
||||||
["/tmp/plugins", "/tmp/otherplugins"]
|
|
||||||
end
|
|
||||||
assert_equal array, site.plugins
|
assert_equal array, site.plugins
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue