name: ESLint CodeX

on: [pull_request]

jobs:
  lint:
    name: ESlint
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2

      - name: Cache dependencies
        uses: actions/cache@v4
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - run: yarn
      - run: yarn lint
