name: CI
on: push

jobs:
  build:
    name: Build and Test
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Run tests
        run:
          make test

name: CI
on: pull_request

jobs:
  build:
    name: Build and Test
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Run tests
        run:
          make test

Change push to pull_request event
Change push to pull_request event

Used push to trigger before opening a PR.
