Skip to content

Commit

Permalink
ci: sync with template repository
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 16, 2024
1 parent 8e53f7c commit 078a736
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 56 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-commit

on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
pre-commit:
name: pre-commit
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: pre-commit
uses: liblaf/template/.github/actions/pre-commit@main
with:
autofix: true
74 changes: 18 additions & 56 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
ci:
autofix_commit_msg: |
ci(pre-commit): auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autoupdate_commit_msg: |
ci(pre-commit): pre-commit autoupdate
autofix_commit_msg: "ci(pre-commit): auto fixes from pre-commit.com hooks"
autoupdate_commit_msg: "ci(pre-commit): pre-commit autoupdate"
skip:
- cargo-check
- cargo-clippy
Expand All @@ -13,14 +9,14 @@ ci:
- latexindent
- poetry-lock
- shellcheck

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.2.1
hooks:
- id: ruff
args:
- --fix
- --unsafe-fixes
- id: ruff-format
- repo: https://github.com/cmhughes/latexindent.pl
rev: V3.23.6
Expand All @@ -37,7 +33,7 @@ repos:
- --modifylinebreaks
- --GCString
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
rev: v3.14.1
hooks:
- id: commitizen
- repo: https://github.com/koalaman/shellcheck-precommit
Expand All @@ -47,6 +43,14 @@ repos:
files: \.(bash|sh|zsh)(\.tmpl)?$
types:
- text
- repo: https://github.com/liblaf/template
rev: main
hooks:
- id: cargo-check
- id: cargo-clippy
- id: cargo-fmt
- id: cargo-test
- id: prettier
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
hooks:
Expand Down Expand Up @@ -85,7 +89,7 @@ repos:
- id: name-tests-test
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.28.0
hooks:
- id: check-dependabot
- id: check-github-actions
Expand All @@ -94,15 +98,15 @@ repos:
rev: 1.7.0
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-export
args:
- --output=requirements.txt
- --without-hashes
- --without-urls
- id: poetry-install
- id: poetry-lock
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.7.0-4
rev: v3.8.0-1
hooks:
- id: shfmt
files: \.(bash|sh|zsh)(\.tmpl)?$
Expand All @@ -115,55 +119,13 @@ repos:
- --case-indent
- --space-redirects
- repo: https://github.com/sirosen/texthooks
rev: 0.6.3
rev: 0.6.4
hooks:
# - id: fix-smartquotes
- id: alphabetize-codeowners
- id: fix-ligatures
- id: fix-spaces
- id: forbid-bidi-controls
- id: alphabetize-codeowners
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.3.0
hooks:
- id: cspell
- repo: local
hooks:
- id: cargo-check
name: cargo check
entry: cargo check
language: rust
types:
- rust
pass_filenames: false
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy
language: rust
types:
- rust
pass_filenames: false
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt
language: rust
types:
- rust
pass_filenames: false
- id: cargo-test
name: cargo test
entry: cargo test
language: rust
types:
- rust
pass_filenames: false
- id: prettier
name: Prettier
entry: prettier --write --ignore-unknown
language: node
types:
- text
additional_dependencies:
- prettier@latest

default_stages:
- pre-commit

0 comments on commit 078a736

Please sign in to comment.