name: Lint
on: pull_request
jobs:
  lint_fe:
    name: Lint FE
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: '14'
      - name: Install dependencies
        run: |
          cd frontend
          ./scripts/install.sh
          yarn
      - name: Run linters
        run: |
          cd frontend
          yarn lint
  lint_be:
    name: Lint BE
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.8'
      - name: Install requirements
        run: |
          pip install --disable-pip-version-check flake8
      - name: Lint
        run: |
          flake8
