shlima/click_house

View on GitHub
.github/workflows/main.yml

Summary

Maintainability
Test Coverage
name: CI

on: [push, pull_request]

jobs:
  rspec:
    runs-on: ubuntu-latest

    services:
      clickhouse:
        image: clickhouse/clickhouse-server:22.9
        ports: 
          - 8123:8123

    strategy:
      matrix:
        ruby-version: [3.1, '3.0', 2.7]

    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby ${{ matrix.ruby-version }}
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}

      - name: Setup v1
        run: make faraday1 bundle

      - name: Setup v2
        run: make faraday2 bundle

      - name: Run tests with faraday v.1 JSON
        run: make faraday1 rspec
      - name: Run tests with faraday v.2 JSON
        run: make faraday2 rspec
      - name: Run tests with faraday v.1 OJ
        run: make faraday1 oj rspec
      - name: Run tests with faraday v.2 OJ
        run: make faraday2 oj rspec

  rubocop:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Set up Ruby 2.7
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.7
          bundler-cache: true # 'bundle install' and cache

      - name: Run Rubocop
        run: bundle exec rubocop