name: CI

on:
- push
- pull_request

jobs:
  test:
    name: Test

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - name: Set up Ruby 2.6
      uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.6.x

    - name: Set up Python 3.7
      uses: actions/setup-python@v1
      with:
        python-version: 3.7

    - name: Install dependencies
      run: |
        sudo apt install build-essential libsqlite3-dev

    - name: Install matplotlib
      run: |
        pip install --user matplotlib

    - name: Build and test with Rake
      run: |
        gem install bundler
        bundle install --jobs 4 --retry 3
        bundle exec rake
