Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git hook scripts #1345

Closed
josecelano opened this issue Mar 3, 2025 · 0 comments · Fixed by #1346
Closed

Add git hook scripts #1345

josecelano opened this issue Mar 3, 2025 · 0 comments · Fixed by #1346
Assignees
Labels
- Developer - Torrust Improvement Experience Continuous Integration Workflows and Automation

Comments

@josecelano
Copy link
Member

I usually run these commands before committing and pushing:

Pre-commit:

cargo +nightly fmt --check &&
    cargo +nightly check --tests --benches --examples --workspace --all-targets --all-features &&
    cargo +nightly doc --no-deps --bins --examples --workspace --all-features &&
    cargo +nightly machete &&
    cargo +stable build &&
    CARGO_INCREMENTAL=0 cargo +stable clippy --no-deps --tests --benches --examples --workspace --all-targets --all-features -- -D clippy::correctness -D clippy::suspicious -D clippy::complexity -D clippy::perf -D clippy::style -D clippy::pedantic &&
    cargo +stable test --tests --benches --examples --workspace --all-targets --all-features

Pre-push:

cargo +nightly fmt --check &&
    cargo +nightly check --tests --benches --examples --workspace --all-targets --all-features &&
    cargo +nightly doc --no-deps --bins --examples --workspace --all-features &&
    cargo +nightly machete &&
    cargo +stable build &&
    CARGO_INCREMENTAL=0 cargo +stable clippy --no-deps --tests --benches --examples --workspace --all-targets --all-features -- -D clippy::correctness -D clippy::suspicious -D clippy::complexity -D clippy::perf -D clippy::style -D clippy::pedantic &&
    cargo +stable test --tests --benches --examples --workspace --all-targets --all-features &&
    cargo +stable run --bin e2e_tests_runner -- --config-toml-path "./share/default/config/tracker.e2e.container.sqlite3.toml"

I will add them to the repo so you can setup git hooks or run them manually.

@josecelano josecelano self-assigned this Mar 3, 2025
@josecelano josecelano added Continuous Integration Workflows and Automation - Developer - Torrust Improvement Experience labels Mar 3, 2025
josecelano added a commit to josecelano/torrust-tracker that referenced this issue Mar 3, 2025
@josecelano josecelano linked a pull request Mar 3, 2025 that will close this issue
josecelano added a commit that referenced this issue Mar 3, 2025
aaf7444 chore: [#1345] add git hook scripts (Jose Celano)

Pull request description:

  Add git hook scripts.

ACKs for top commit:
  josecelano:
    ACK aaf7444

Tree-SHA512: 03d9210166a31651ea4958b98159e3776eae7394da4014d854d787b81b374bfe53acd8a8072fcd45a3f3e558cea09d53ece10eb32c7d9026c65d9d736f591a85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Developer - Torrust Improvement Experience Continuous Integration Workflows and Automation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant