From 4380afb5c15e7f6057fd44bdbd6bde410bb98378 Mon Sep 17 00:00:00 2001 From: PeriniM Date: Mon, 6 Jan 2025 15:34:23 +0100 Subject: [PATCH] feat: add codequality workflow --- .../{pylint.yml => code-quality.yml} | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) rename .github/workflows/{pylint.yml => code-quality.yml} (72%) diff --git a/.github/workflows/pylint.yml b/.github/workflows/code-quality.yml similarity index 72% rename from .github/workflows/pylint.yml rename to .github/workflows/code-quality.yml index 8ff41bc9..2a3f6b5c 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/code-quality.yml @@ -1,3 +1,5 @@ +name: Code Quality Checks + on: push: paths: @@ -5,16 +7,29 @@ on: - '.github/workflows/pylint.yml' jobs: - build: + quality: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Install uv uses: astral-sh/setup-uv@v3 + - name: Install dependencies 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 run: uv run poe pylint-ci + - name: Check Pylint score run: | pylint_score=$(uv run poe pylint-score-ci | grep 'Raw metrics' | awk '{print $4}') @@ -23,4 +38,4 @@ jobs: exit 1 else echo "Pylint score is acceptable." - fi \ No newline at end of file + fi