name: CI

on: [push, pull_request]

jobs:
  flake8:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1

      - name: Setup Python
        uses: actions/setup-python@v1
        with:
          python-version: 3.x

      - name: Install flake8
        run: |
          python -m pip install -U pip
          pip install flake8

      - run: flake8 .

  pydocstyle:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1

      - name: Setup Python
        uses: actions/setup-python@v1
        with:
          python-version: 3.x

      - name: Install pydocstyle
        run: |
          python -m pip install -U pip
          pip install pydocstyle

      - name: Run pydocstyle (allow failure)
        run: pydocstyle
        working-directory: st3/sublime_lib
        continue-on-error: true
