name: Pull request

on:
  pull_request:
    branches:
      - develop
      - main

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6.8
      - name: Install dependencies
        run: yarn install --pure-lockfile
      - name: Build
        run: yarn build
      - name: ESLint
        run: yarn lint
      - name: Test
        run: yarn test
