name: Test

on:
    pull_request:
        types:
            - opened
            - synchronize
            - reopened
            - ready_for_review

jobs:
    build:
        runs-on: ubuntu-latest
        if: github.event.pull_request.draft == false
        steps:
            - uses: actions/checkout@v2
              with:
                  ref: ${{ github.event.pull_request.head.sha }}

            - uses: actions/setup-node@v2
              with:
                node-version: '18'

            - run: npm install

            - run: npm run lint

