name: CI - Pull Request Open

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  push:
    branches: ["!master"]
  pull_request:
    branches: [master]
    types:
      - labeled
      - unlabeled
      - synchronize
      - opened
      - edited
      - ready_for_review
      - reopened
      - unlocked

jobs:
  test:
    runs-on: ubuntu-latest
    name: Tests
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: "14.17"
      - run: npm install
      - run: npm run lint
      - run: npm run test
