Skip to content

Commit

Permalink
Update workflow and pre-commit version
Browse files Browse the repository at this point in the history
- Update github actions versions
- Use pip cache
- Use pre-commit action which also uses caching
- Bump pre-commit hook versions
  • Loading branch information
m-appel committed Jan 4, 2024
1 parent 52bed0d commit a932e65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit a932e65

Please sign in to comment.