Skip to content

Commit f161d60

Browse files
authored
Merge pull request #7 from fadyphil/test/integration-tests
Test/integration tests
2 parents 8cf421d + 8e1d682 commit f161d60

12 files changed

Lines changed: 709 additions & 56 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main", "master"]
6+
pull_request:
7+
branches: ["main", "master"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build-and-test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: rustfmt, clippy
24+
25+
- name: Cache Cargo dependencies
26+
uses: Swatinem/rust-cache@v2
27+
28+
- name: Check formatting
29+
run: cargo fmt --all -- --check
30+
31+
- name: Lint with Clippy
32+
run: cargo clippy --all-targets --all-features -- -D warnings
33+
34+
- name: Run Unit and Integration tests
35+
run: cargo test --all

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,12 @@ refactor(object): eliminate intermediate heap allocations in create_object
6767

6868
Replaced format!().as_bytes() + extend_from_slice patterns with the write! macro.
6969
```
70+
71+
## Continuous Integration (CI)
72+
73+
All Pull Requests are automatically tested against our GitHub Actions pipeline. To ensure your PR is green, run the following locally before pushing:
74+
75+
```bash
76+
cargo fmt --all
77+
cargo clippy --all-targets --all-features -- -D warnings
78+
cargo test --all

Cargo.lock

Lines changed: 165 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ thiserror = "2.0.18"
2222
anyhow = "1.0"
2323
serde = {version = "1.0", features = ["derive"]}
2424
toml = "1.1.2+spec-1.1.0"
25-
clap = { version = "4.5", features = ["derive"] }
25+
clap = { version = "4.5", features = ["derive"] }
26+
tempfile = "3.10"
27+
assert_cmd = "2.0"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<img src="https://img.shields.io/badge/License-MIT-royalblue" alt="License" />
2020
</p>
2121

22+
[![CI](https://github.com/<fadyphil>/git-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/<fadyphil>/git-rs/actions/workflows/ci.yml)
23+
2224
[Overview](#overview)[Architecture](#architecture)[Quick Start](#quick-start)[Roadmap](#roadmap)
2325

2426
</div>

0 commit comments

Comments
 (0)