From e3d0542ce6860bd6a6f348602d11131c372513bc Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Wed, 1 Sep 2021 20:17:50 +0530 Subject: [PATCH] Set up Continuous Integration via GH Actions (#450) Merge pull request 450 --- .github/workflows/ci.yml | 103 +++++++++++++++++++++++++++++++++++++++ .travis.yml | 18 ------- 2 files changed, 103 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..75291c8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d5ffa5c..0000000 --- a/.travis.yml +++ /dev/null @@ -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"