From 736d37f95f717096b4c13ec37dfed9f9d04985d1 Mon Sep 17 00:00:00 2001
From: Laurent Arnoud <laurent@spkdev.net>
Date: Sat, 9 Jan 2021 17:55:03 +0100
Subject: [PATCH] Add jruby to github actions

---
 .github/workflows/ci.yml | 2 +-
 .gitlab-ci.yml           | 2 +-
 test/validator_test.rb   | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 95112f8..b4b3877 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,7 +13,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        ruby: [2.5, 2.6, 2.7, '3.0']
+        ruby: [2.5, 2.6, 2.7, '3.0', jruby-9.2]
     steps:
       - uses: actions/checkout@v2
       - name: Set up Ruby
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d3ca86e..638da2b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,7 +39,7 @@ test:3.0:
 
 test:jruby:
   extends: .tests
-  image: 'jruby:9.2.12-jre'
+  image: 'jruby:9.2-jre'
 
 coverage:
   image: 'ruby:2.7'
diff --git a/test/validator_test.rb b/test/validator_test.rb
index d73f74b..de814b4 100644
--- a/test/validator_test.rb
+++ b/test/validator_test.rb
@@ -101,6 +101,7 @@ describe ValidateWebsite::Validator do
 
       describe('with tidy') do
         it 'should have an array of errors' do
+          skip('tidy is not installed') unless ValidateWebsite::Validator.tidy
           validator = subject.new(@html5_page.doc,
                                   @html5_page.body)
           _(validator.valid?).must_equal false
@@ -108,6 +109,7 @@ describe ValidateWebsite::Validator do
         end
 
         it 'should exclude errors ignored by :ignore option' do
+          skip('tidy is not installed') unless ValidateWebsite::Validator.tidy
           ignore = /letter not allowed here|trimming empty/
           validator = subject.new(@html5_page.doc,
                                   @html5_page.body,
-- 
GitLab