mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
* lint: simplify hooks already covered by Ruff * prune dev dependency * setting E, W, F * poetry? * autopep8 * quote-style = "single" * double-quote-string-fixer * --all-files * apply * Q * drop double-quote-string-fixer * --all-files * apply pre-commit * python3.11 -m poetry lock --no-update --------- Co-authored-by: Robert Brennan <accounts@rbren.io>
43 lines
939 B
YAML
43 lines
939 B
YAML
name: Lint
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
lint-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd frontend
|
|
npm install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: |
|
|
cd frontend
|
|
npm run lint
|
|
|
|
lint-python:
|
|
name: Lint python
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install pre-commit
|
|
run: pip install pre-commit==3.7.0
|
|
- name: Run pre-commit hooks
|
|
run: |
|
|
pre-commit run \
|
|
--all-files \
|
|
--show-diff-on-failure \
|
|
--config ./dev_config/python/.pre-commit-config.yaml
|