mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
feat: Enable git hooks with husky (#4984)
* build(deps): Adds husky for Git hooks - Integrates the husky package as a development dependency. - Enables the configuration and enforcement of pre-commit and pre-push Git hooks. - Improves code quality and consistency by automating checks before commits. Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com> * feat: Add Husky prepare hook - Automatically installs Git hooks for developers - Ensures consistent code quality checks before commits or pushes - Streamlines the developer setup process Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com> * ci: Avoid installing Git Hooks on GitHub Workflows - Adds `HUSKY: 0` environment variable to all workflow definitions. - Prevents local development hooks from executing in CI, which can cause unnecessary failures or overhead. - See https://typicode.github.io/husky/how-to.html#ci-server-and-docker Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com> --------- Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com>
This commit is contained in:
1
.github/workflows/alpha.yml
vendored
1
.github/workflows/alpha.yml
vendored
@@ -25,6 +25,7 @@ env:
|
||||
TAG_CHANNEL: Alpha
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUST_BACKTRACE: short
|
||||
HUSKY: 0
|
||||
concurrency:
|
||||
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
|
||||
|
||||
|
||||
1
.github/workflows/autobuild.yml
vendored
1
.github/workflows/autobuild.yml
vendored
@@ -11,6 +11,7 @@ env:
|
||||
TAG_CHANNEL: AutoBuild
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUST_BACKTRACE: short
|
||||
HUSKY: 0
|
||||
concurrency:
|
||||
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
3
.github/workflows/cross_check.yaml
vendored
3
.github/workflows/cross_check.yaml
vendored
@@ -9,6 +9,9 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
HUSKY: 0
|
||||
|
||||
jobs:
|
||||
cargo-check:
|
||||
# Treat all Rust compiler warnings as errors
|
||||
|
||||
1
.github/workflows/dev.yml
vendored
1
.github/workflows/dev.yml
vendored
@@ -30,6 +30,7 @@ env:
|
||||
TAG_CHANNEL: DeployTest
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUST_BACKTRACE: short
|
||||
HUSKY: 0
|
||||
concurrency:
|
||||
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
3
.github/workflows/fmt.yml
vendored
3
.github/workflows/fmt.yml
vendored
@@ -7,6 +7,9 @@ name: Check Formatting
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
HUSKY: 0
|
||||
|
||||
jobs:
|
||||
rustfmt:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
2
.github/workflows/lint-clippy.yml
vendored
2
.github/workflows/lint-clippy.yml
vendored
@@ -3,6 +3,8 @@ name: Clippy Lint
|
||||
on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
env:
|
||||
HUSKY: 0
|
||||
|
||||
jobs:
|
||||
clippy:
|
||||
|
||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -11,6 +11,7 @@ permissions: write-all
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
RUST_BACKTRACE: short
|
||||
HUSKY: 0
|
||||
concurrency:
|
||||
# only allow per workflow per commit (and not pr) to run at a time
|
||||
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
|
||||
|
||||
3
.github/workflows/updater.yml
vendored
3
.github/workflows/updater.yml
vendored
@@ -2,6 +2,9 @@ name: Updater CI
|
||||
|
||||
on: workflow_dispatch
|
||||
permissions: write-all
|
||||
env:
|
||||
HUSKY: 0
|
||||
|
||||
jobs:
|
||||
release-update:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user