--- a +++ b/.github/workflows/format.yml @@ -0,0 +1,46 @@ +name: formatting-linting + +on: + pull_request: + branches: + - main + +jobs: + + check-formatting-linting: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: false + + - name: Install dependencies + run: poetry install + + - name: black + run: python -m black . --check + + - name: isort + run: python -m isort . -c + + - name: docformatter + run: python -m docformatter . --check + + - name: flake8 + run: python -m flake8 . + + - name: pylint + run: python -m pylint deduce/ \ No newline at end of file