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 124b2d5 commit 150791d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 51 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
64 changes: 13 additions & 51 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.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 @@ -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 @@ -94,13 +98,13 @@ 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.8.0-1
hooks:
Expand All @@ -117,53 +121,11 @@ repos:
- repo: https://github.com/sirosen/texthooks
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 150791d

Please sign in to comment.