mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-09 21:19:20 +08:00
feat: add codequality workflow
This commit is contained in:
parent
c5630cee4d
commit
4380afb5c1
@ -1,3 +1,5 @@
|
|||||||
|
name: Code Quality Checks
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
@ -5,16 +7,29 @@ on:
|
|||||||
- '.github/workflows/pylint.yml'
|
- '.github/workflows/pylint.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
quality:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v3
|
uses: astral-sh/setup-uv@v3
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --frozen
|
run: uv sync --frozen
|
||||||
|
|
||||||
|
- name: Run Ruff
|
||||||
|
run: uv run ruff check scrapegraphai
|
||||||
|
|
||||||
|
- name: Run Black
|
||||||
|
run: uv run black --check scrapegraphai
|
||||||
|
|
||||||
|
- name: Run isort
|
||||||
|
run: uv run isort --check-only scrapegraphai
|
||||||
|
|
||||||
- name: Analysing the code with pylint
|
- name: Analysing the code with pylint
|
||||||
run: uv run poe pylint-ci
|
run: uv run poe pylint-ci
|
||||||
|
|
||||||
- name: Check Pylint score
|
- name: Check Pylint score
|
||||||
run: |
|
run: |
|
||||||
pylint_score=$(uv run poe pylint-score-ci | grep 'Raw metrics' | awk '{print $4}')
|
pylint_score=$(uv run poe pylint-score-ci | grep 'Raw metrics' | awk '{print $4}')
|
||||||
@ -23,4 +38,4 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Pylint score is acceptable."
|
echo "Pylint score is acceptable."
|
||||||
fi
|
fi
|
||||||
Loading…
Reference in New Issue
Block a user