Skip to content

Commit

Permalink
Updating GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Jan 28, 2022
1 parent 4e40785 commit c28379d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
name: pre-commit

on:
workflow_dispatch:
pull_request:
push:
branches: [master]
branches: [main]

jobs:

pre-commit:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: set PY
run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/[email protected]
- uses: pre-commit/[email protected]
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https:/psf/black
rev: 21.9b0
rev: 21.12b0
hooks:
- id: black
args: [--safe, --quiet, --line-length=100]
- repo: https:/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -20,13 +20,13 @@ repos:
rev: v1.1
hooks:
- id: autoflake
args: [--in-place, --remove-all-unused-imports, --remove-unused-variable]
args: [--in-place, --remove-unused-variable, --remove-all-unused-imports]
- repo: https:/asottile/reorder_python_imports
rev: v2.6.0
rev: v2.7.1
hooks:
- id: reorder-python-imports
- repo: https:/asottile/pyupgrade
rev: v2.29.0
rev: v2.31.0
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand All @@ -36,11 +36,11 @@ repos:
- id: flake8
args: [--max-line-length=100]
- repo: https:/asottile/setup-cfg-fmt
rev: v1.18.0
rev: v1.20.0
hooks:
- id: setup-cfg-fmt
- repo: https:/pocc/pre-commit-hooks
rev: v1.3.4
rev: v1.3.5
hooks:
- id: clang-format
args: [-i]

0 comments on commit c28379d

Please sign in to comment.