Skip to content

Commit

Permalink
Switch to gitlab ci and remove 2.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
spk committed Aug 10, 2020
1 parent fef7db9 commit 3bb5619
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 9 deletions.
51 changes: 51 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
stages:
- test
- coverage

default:
before_script:
- apt-get update -qy
- apt-get install -y libtidy-dev
- ruby -v
- which ruby
- gem install bundler --no-document
- bundle install --jobs $(nproc) "${FLAGS[@]}"

.tests:
script:
- bundle exec rake
stage: test

test:2.4:
extends: .tests
image: 'ruby:2.4'

test:2.5:
extends: .tests
image: 'ruby:2.5'
script:
- bundle exec rake

test:2.6:
extends: .tests
image: 'ruby:2.6'
script:
- bundle exec rake

test:2.7:
extends: .tests
image: 'ruby:2.7'

test:jruby:
extends: .tests
image: 'jruby:9.2.12-jre'

coverage:
image: 'ruby:2.7'
script:
- bundle exec rake test
artifacts:
paths:
- coverage/
stage: coverage
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.4
Naming/FileName:
Enabled: false
Lint/MissingCopEnableDirective:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
dist: xenial
dist: bionic
sudo: true
language: ruby
cache: bundler
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/htacg/tidy-html5/releases/download/5.4.0/tidy-5.4.0-64bit.deb; sudo apt-get remove '^libtidy.*'; sudo dpkg -i tidy-5.4.0-64bit.deb; fi
- gem install bundler -v '<2'
- gem install bundler --no-document
rvm:
- 2.3
- 2.4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ The MIT License
Copyright (c) 2009-2020 Laurent Arnoud <laurent@spkdev.net>

---
[![Build](https://img.shields.io/travis/spk/validate-website.svg)](https://travis-ci.org/spk/validate-website)
[![Build](https://img.shields.io/gitlab/pipeline/spkdev/validate-website/master)](https://gitlab.com/spkdev/validate-website/-/commits/master)
[![Coverage](https://gitlab.com/spkdev/validate-website/badges/master/coverage.svg)](https://gitlab.com/spkdev/validate-website/-/commits/master)
[![Version](https://img.shields.io/gem/v/validate-website.svg)](https://rubygems.org/gems/validate-website)
[![Documentation](https://img.shields.io/badge/doc-rubydoc-blue.svg)](http://www.rubydoc.info/gems/validate-website)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT "MIT")
[![Coverage Status](https://img.shields.io/coveralls/github/spk/validate-website.svg)](https://coveralls.io/github/spk/validate-website?branch=master)
[![Inline docs](https://inch-ci.org/github/spk/validate-website.svg?branch=master)](http://inch-ci.org/github/spk/validate-website)
3 changes: 1 addition & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ require 'rake/testtask'
require 'rubocop/rake_task'
require 'asciidoctor'

default = %i[test]
default << :rubocop unless RUBY_ENGINE == 'rbx'
default = %i[test rubocop]
task default: default

desc 'Update manpage from asciidoc file'
Expand Down
3 changes: 1 addition & 2 deletions validate-website.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |s|
s.name = 'validate-website'
s.version = ValidateWebsite::VERSION
s.license = 'MIT'
s.required_ruby_version = '>= 2.3.0'
s.required_ruby_version = '>= 2.4'
s.add_dependency 'crass', '~> 1'
s.add_dependency 'paint', '~> 2'
s.add_dependency 'slop', '~> 4.6'
Expand All @@ -20,7 +20,6 @@ Gem::Specification.new do |s|
s.add_dependency 'w3c_validators', '~> 1.3'
s.add_development_dependency 'asciidoctor', '~> 1.5'
s.add_development_dependency 'minitest', '~> 5.0'
s.add_development_dependency('racc') if RUBY_ENGINE == 'rbx'
s.add_development_dependency 'rake', '~> 12'
s.add_development_dependency 'rubocop', '~> 0.76.0'
s.add_development_dependency 'webmock', '~> 3.4'
Expand Down

0 comments on commit 3bb5619

Please sign in to comment.