This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
Adding required permission for the jobs #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Checks | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
mypy-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
cache-dependency-path: | | |
backend/requirements/default.txt | |
backend/requirements/dev.txt | |
- run: | | |
python -m pip install --upgrade pip | |
pip install -r backend/requirements/default.txt | |
pip install -r backend/requirements/dev.txt | |
- name: Run MyPy | |
run: | | |
cd backend | |
mypy . | |
- name: Run ruff | |
run: | | |
cd backend | |
ruff . | |
- name: Check import order with reorder-python-imports | |
run: | | |
cd backend | |
find ./danswer -name "*.py" | xargs reorder-python-imports --py311-plus | |
- name: Check code formatting with Black | |
run: | | |
cd backend | |
black --check . |