Set up Continuous Integration via GH Actions (#450)

Merge pull request 450
This commit is contained in:
Ashwin Maroli 2021-09-01 20:17:50 +05:30 committed by GitHub
parent 01fcf38c8b
commit e3d0542ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 103 additions and 18 deletions

103
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,103 @@
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
j4:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: "Jekyll ${{ matrix.jekyll_version }} (Ruby ${{ matrix.ruby_version }})"
runs-on: 'ubuntu-latest'
env:
JEKYLL_VERSION: ${{ matrix.jekyll_version }}
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5
- 2.7
- 3.0
jekyll_version:
- "~> 4.0"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Execute tests
run: bundle exec rspec
j3:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: "Jekyll ${{ matrix.jekyll_version }} (Ruby ${{ matrix.ruby_version }})"
runs-on: 'ubuntu-latest'
env:
JEKYLL_VERSION: ${{ matrix.jekyll_version }}
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5
jekyll_version:
- "~> 3.9"
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Execute tests
run: bundle exec rspec
style_check:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: "Code Style Check (Ruby ${{ matrix.ruby_version }})"
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Check Style Offenses
run: bundle exec rubocop -S -D
gem_build:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: "Test Gem build (Ruby ${{ matrix.ruby_version }})"
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Test Gem build
run: bundle exec gem build jekyll-seo-tag.gemspec

View File

@ -1,18 +0,0 @@
language: ruby
cache: bundler
rvm:
- 2.5
- 2.7
before_install:
- gem update --system
- gem install bundler
script: script/cibuild
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
matrix:
- JEKYLL_VERSION="~> 3.9"
- JEKYLL_VERSION="~> 4.0"