From a932e6514f23c6452dde47135480518faa3ad8f2 Mon Sep 17 00:00:00 2001 From: Malte Tashiro Date: Thu, 4 Jan 2024 05:23:59 +0000 Subject: [PATCH] Update workflow and pre-commit version - Update github actions versions - Use pip cache - Use pre-commit action which also uses caching - Bump pre-commit hook versions --- .github/workflows/pre-commit.yml | 16 ++++++---------- .pre-commit-config.yaml | 10 +++++----- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 61b31c7..8a14253 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -7,20 +7,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.10' + cache: 'pip' - name: Install dependencies run: pip install -r requirements.txt - # This will configure the pre-commit hooks in - # '.pre-commit-config.yaml' file. - - name: Configure pre-commit - run: pre-commit install - - - name: Run pre-commit hooks - run: pre-commit run --all-files + - name: pre-commit + uses: pre-commit/action@v3.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a90971e..051828d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ files: \.py$ repos: - repo: https://github.com/PyCQA/autoflake - rev: v2.2.0 + rev: v2.2.1 hooks: - id: autoflake args: [--in-place] - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-autopep8 - rev: v2.0.2 + rev: v2.0.4 hooks: - id: autopep8 - repo: https://github.com/PyCQA/docformatter @@ -19,12 +19,12 @@ repos: - id: docformatter args: [--in-place, --wrap-summaries, '88', --wrap-descriptions, '88'] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: double-quote-string-fixer - id: mixed-line-ending args: [--fix, lf] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8