name: Continuous Integration

on:
  pull_request:
    branches:
    - master

jobs:
  ci:
    if: "!contains(github.event.commits[0].message, '[ci skip]')"
    name: 'Ruby ${{ matrix.ruby_version }}'
    runs-on: 'ubuntu-latest'

    strategy:
      fail-fast: false
      matrix:
        ruby_version:
        - 2.5
        - 2.7
        - 3.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:  bash script/test
      - name: Check Style Offenses
        run:  bash script/fmt
      - name: Test Gem build
        run:  bundle exec rake build

  ghp:
    if: "!contains(github.event.commits[0].message, '[ci skip]')"
    name: Ruby 2.7 with GitHub Pages Gem
    runs-on: 'ubuntu-latest'
    env:
      GH_PAGES: true
    strategy:
      fail-fast: false
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 5
      - name: "Set up Ruby 2.7"
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          bundler-cache: true
      - name: Execute tests
        run:  bash script/test

Add workflow file for Continuous Integration
Add workflow file for Continuous Integration