mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 15:28:14 -05:00
Adding pre-commit and CI for ruff and mypy (#69)
* don't modify directories * oops typo * dev_config/python * add config to CI * bump CI python to 3.10 * 3.11? * del actions/ * add suggestions * delete unused code * missed some * oops missed another one * remove a file
This commit is contained in:
20
.github/workflows/lint.yml
vendored
20
.github/workflows/lint.yml
vendored
@@ -3,7 +3,7 @@ name: Lint
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
lint-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -15,4 +15,20 @@ jobs:
|
||||
npm ci --legacy-peer-deps
|
||||
- run: |
|
||||
cd frontend
|
||||
npm run lint
|
||||
npm run lint
|
||||
|
||||
lint-python:
|
||||
name: Lint python
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.11
|
||||
- name: Install dependencies
|
||||
run: pip install ruff mypy types-requests
|
||||
- name: Run ruff
|
||||
run: ruff check --config dev_config/python/ruff.toml opendevin/ server/ agenthub/
|
||||
- name: Run mypy
|
||||
run: mypy --config-file dev_config/python/mypy.ini opendevin/ server/ agenthub/
|
||||
|
||||
Reference in New Issue
Block a user