From f42b8cbf77f4824f2a7a135186968109dbc87c91 Mon Sep 17 00:00:00 2001 From: Bingxin Ke Date: Mon, 15 Apr 2024 14:52:05 +0200 Subject: [PATCH] [ADD] ruff CI test --- .github/workflows/pr_ruff.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pr_ruff.yml diff --git a/.github/workflows/pr_ruff.yml b/.github/workflows/pr_ruff.yml new file mode 100644 index 0000000..12b0d95 --- /dev/null +++ b/.github/workflows/pr_ruff.yml @@ -0,0 +1,32 @@ +name: Run code quality check with Ruff + +run-name: Checking code quality. +on: + pull_request: + branches: + - main + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + check_code_quality: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff==0.3.7 + - name: Check quality + run: | + ruff check . + ruff format . --check \ No newline at end of file