diff --git a/.github/workflows/style_check.yml b/.github/workflows/style_check.yml index 6755f44..a6b48b6 100644 --- a/.github/workflows/style_check.yml +++ b/.github/workflows/style_check.yml @@ -15,21 +15,17 @@ jobs: python-version: [3.9] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Install uv + uses: astral-sh/setup-uv@v3 with: - python-version: ${{ matrix.python-version }} - architecture: x64 - cache: 'pip' - cache-dependency-path: 'requirements*' - - name: check OS - run: cat /etc/os-release + version: "0.4.21" + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - name: Set up Python ${{ matrix.python-version }} + run: uv python install ${{ matrix.python-version }} - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y git make gcc - - name: Install/upgrade dev dependencies - run: python3 -m pip install -r requirements.dev.txt + sudo apt-get install -y make - name: Lint check - run: | - make lint + run: uv run --only-dev make lint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 615dc54..e8a63b8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ repos: - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.10 + rev: v0.6.9 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/Makefile b/Makefile index eacf888..a273bef 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ style: ## update code style. lint: ## run linter. ruff check ${target_dirs} + ruff format --check ${target_dirs} dev-deps: ## install development deps pip install -r requirements.dev.txt diff --git a/pyproject.toml b/pyproject.toml index 46fc7c2..cee4d6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ dev = [ "coverage>=7", "pre-commit>=3", "pytest>=8", - "ruff==0.4.10", + "ruff==0.6.9", "tomli>=2; python_version < '3.11'", ] # Dependencies for running the tests