* 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>
68 lines
1.5 KiB
YAML
68 lines
1.5 KiB
YAML
name: Cross Platform Cargo Check
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
# pull_request:
|
|
# push:
|
|
# branches: [main, dev]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
HUSKY: 0
|
|
|
|
jobs:
|
|
cargo-check:
|
|
# Treat all Rust compiler warnings as errors
|
|
env:
|
|
RUSTFLAGS: "-D warnings"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust Stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Add Rust Target
|
|
run: rustup target add ${{ matrix.target }}
|
|
|
|
- name: Install Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
name: Install pnpm
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Pnpm install and check
|
|
run: |
|
|
pnpm i
|
|
pnpm run prebuild ${{ matrix.target }}
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: src-tauri
|
|
save-if: false
|
|
|
|
- name: Cargo Check (deny warnings)
|
|
working-directory: src-tauri
|
|
run: |
|
|
cargo check --target ${{ matrix.target }} --workspace --all-features
|