name: Lint
on: [push, pull_request]
jobs:
  Lint:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v2.3.4
      with:
        fetch-depth: 0

    - name: Installing Node
      uses: actions/setup-node@v2.4.0
      with:
        node-version: 14

    - name: Install frontend deps
      working-directory: frontend
      run: |
        npm i -g yarn@1.19.1
        yarn

    - name: Lint frontend
      working-directory: frontend
      run: yarn lint

    - name: Install backend deps
      working-directory: backend
      run: |
        pip3 install poetry
        poetry install

    - name: Lint backend
      working-directory: backend
      run: poetry run flake8 .
