name: CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      BUNDLE_BIN: bin

    steps:
      - uses: actions/checkout@v4

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: "2.6"
          bundler-cache: true

      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version: "1.18"

      - name: Run tests
        run: make test-all
        env:
          CI: true