Skip to content

Commit d301589

Browse files
committed
feat: add comprehensive CI/CD pipeline and development workflows
This commit introduces a complete CI/CD pipeline with production-grade automation for testing, building, and releasing the kode-bridge crate. ### GitHub Workflows Added - CI workflow: Multi-Rust version testing, cross-platform support, code coverage - Release workflow: Automated publishing to crates.io and GitHub releases - Documentation workflow: Auto-generated docs with spell checking - Pull request template for structured code reviews ### Key Features - Leverages existing Makefile for consistent build commands - Multi-platform binary releases (Linux, Windows, macOS x86_64/ARM64) - Automatic CHANGELOG.md extraction for release notes - Comprehensive caching for faster CI runs - Production-grade quality gates before releases ### Dependencies Management - Dependabot configuration for automated dependency updates - Spell check configuration with project-specific dictionary - Updated all GitHub Actions to latest stable versions ### Release Process Simply create and push a git tag (e.g., v0.2.0) to trigger: 1. Quality checks with make check 2. Multi-platform builds 3. Automatic crates.io publishing 4. GitHub release creation with binaries All workflows use the latest stable Rust by default with MSRV 1.70.0 compatibility testing.
1 parent 8cc93e9 commit d301589

File tree

7 files changed

+628
-2
lines changed

7 files changed

+628
-2
lines changed

.cspell.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": [
5+
"kode",
6+
"kodebarinn",
7+
"ipc",
8+
"tokio",
9+
"rustc",
10+
"clippy",
11+
"rustfmt",
12+
"crates",
13+
"semver",
14+
"async",
15+
"await",
16+
"struct",
17+
"enum",
18+
"impl",
19+
"fn",
20+
"pub",
21+
"mod",
22+
"mut",
23+
"cfg",
24+
"attrs",
25+
"lints",
26+
"deps",
27+
"unix",
28+
"msrv",
29+
"api",
30+
"http",
31+
"json",
32+
"url",
33+
"uri",
34+
"utf8",
35+
"tcp",
36+
"udp",
37+
"tls",
38+
"ssl",
39+
"dns",
40+
"ip",
41+
"os",
42+
"cpu",
43+
"gpu",
44+
"cli",
45+
"ttl",
46+
"lru",
47+
"uuid",
48+
"jwt",
49+
"oauth",
50+
"cors",
51+
"csrf",
52+
"xss",
53+
"sql",
54+
"nosql",
55+
"redis",
56+
"postgres",
57+
"mysql",
58+
"sqlite",
59+
"mongodb",
60+
"elasticsearch",
61+
"memcached",
62+
"nginx",
63+
"apache",
64+
"dockerfile",
65+
"kubernetes",
66+
"docker",
67+
"yaml",
68+
"yml",
69+
"toml",
70+
"json5",
71+
"proto",
72+
"grpc",
73+
"graphql",
74+
"websocket",
75+
"webhooks",
76+
"middleware",
77+
"auth",
78+
"jwt",
79+
"bcrypt",
80+
"sha256",
81+
"md5",
82+
"hmac",
83+
"rsa",
84+
"ecdsa",
85+
"aes",
86+
"des",
87+
"ssl",
88+
"tls",
89+
"https",
90+
"wss",
91+
"interprocess"
92+
],
93+
"ignoreWords": [
94+
"README",
95+
"TODO",
96+
"FIXME",
97+
"HACK",
98+
"XXX",
99+
"RUSTSEC"
100+
],
101+
"patterns": [
102+
{
103+
"name": "Rust code",
104+
"pattern": "/```rust[\\s\\S]*?```/g"
105+
},
106+
{
107+
"name": "Code blocks",
108+
"pattern": "/`[^`]+`/g"
109+
},
110+
{
111+
"name": "URLs",
112+
"pattern": "/https?:\\/\\/[^\\s]+/g"
113+
},
114+
{
115+
"name": "File paths",
116+
"pattern": "/[.\\w\\/\\\\-]+\\.[a-z]{2,4}/gi"
117+
}
118+
],
119+
"ignoreRegExpList": [
120+
"/\\b[A-Z]{2,}\\b/g",
121+
"/\\b\\w*[0-9]\\w*/g",
122+
"/\\b[a-f0-9]{8,}\\b/gi"
123+
],
124+
"files": [
125+
"**/*.md",
126+
"**/*.rs"
127+
],
128+
"ignorePaths": [
129+
"target/**",
130+
".git/**",
131+
"node_modules/**",
132+
"*.lock"
133+
]
134+
}

.github/pull_request_template.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
## Description
2+
3+
Brief description of the changes made in this PR.
4+
5+
## Type of Change
6+
7+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
8+
- [ ] ✨ New feature (non-breaking change which adds functionality)
9+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] 📚 Documentation update
11+
- [ ] 🔧 Maintenance/refactoring
12+
- [ ] ⚡ Performance improvement
13+
- [ ] 🔒 Security fix
14+
- [ ] 🧪 Test improvement
15+
16+
## Testing
17+
18+
- [ ] All existing tests pass (`cargo test --lib --all-features`)
19+
- [ ] New tests added for new functionality
20+
- [ ] Manual testing performed
21+
- [ ] Examples tested if applicable
22+
23+
## Code Quality
24+
25+
- [ ] Code follows the project's style guidelines (`cargo fmt`)
26+
- [ ] Code passes all linting checks (`cargo clippy`)
27+
- [ ] No new warnings introduced
28+
- [ ] Documentation updated if needed
29+
- [ ] CHANGELOG.md updated for user-facing changes
30+
31+
## Security
32+
33+
- [ ] No sensitive information exposed
34+
- [ ] Input validation added where appropriate
35+
- [ ] Security audit passed (`cargo audit`)
36+
- [ ] No new dependencies with known vulnerabilities
37+
38+
## Performance
39+
40+
- [ ] No significant performance regression
41+
- [ ] Performance improvements measured if applicable
42+
- [ ] Memory usage considered
43+
44+
## Breaking Changes
45+
46+
If this PR introduces breaking changes, please describe:
47+
48+
1. What breaks
49+
2. Why the change was necessary
50+
3. Migration path for users
51+
52+
## Additional Notes
53+
54+
Any additional information, concerns, or considerations for reviewers.
55+
56+
## Related Issues
57+
58+
Closes #(issue number)
59+
Related to #(issue number)

.github/workflows/ci.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
pull_request:
7+
branches: [ main, dev ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
test:
15+
name: Test Suite
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
rust:
20+
- stable
21+
- beta
22+
- 1.70.0 # MSRV
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install Rust
27+
uses: dtolnay/rust-toolchain@master
28+
with:
29+
toolchain: ${{ matrix.rust }}
30+
components: rustfmt, clippy
31+
32+
- name: Cache dependencies
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
~/.cargo/registry
37+
~/.cargo/git
38+
target
39+
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
40+
restore-keys: |
41+
${{ runner.os }}-cargo-${{ matrix.rust }}-
42+
${{ runner.os }}-cargo-
43+
44+
- name: Run production checks
45+
if: matrix.rust == 'stable'
46+
run: make check
47+
48+
- name: Run tests only (non-stable)
49+
if: matrix.rust != 'stable'
50+
run: make test
51+
52+
- name: Build release
53+
if: matrix.rust == 'stable'
54+
run: make build
55+
56+
cross-platform:
57+
name: Cross Platform
58+
runs-on: ${{ matrix.os }}
59+
strategy:
60+
matrix:
61+
os: [ubuntu-latest, windows-latest, macos-latest]
62+
rust: [stable]
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- name: Install Rust
67+
uses: dtolnay/rust-toolchain@stable
68+
with:
69+
components: rustfmt, clippy
70+
71+
- name: Cache dependencies
72+
uses: actions/cache@v4
73+
with:
74+
path: |
75+
~/.cargo/registry
76+
~/.cargo/git
77+
target
78+
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
79+
80+
- name: Run cross-platform tests
81+
run: make test
82+
83+
docs:
84+
name: Documentation
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: actions/checkout@v4
88+
89+
- name: Install Rust
90+
uses: dtolnay/rust-toolchain@stable
91+
92+
- name: Cache dependencies
93+
uses: actions/cache@v4
94+
with:
95+
path: |
96+
~/.cargo/registry
97+
~/.cargo/git
98+
target
99+
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}
100+
101+
- name: Build documentation
102+
run: cargo doc --all-features --no-deps
103+
104+
- name: Check for broken links in docs
105+
run: cargo doc --all-features --no-deps 2>&1 | tee doc-output.log && ! grep -i warning doc-output.log
106+
107+
coverage:
108+
name: Code Coverage
109+
runs-on: ubuntu-latest
110+
steps:
111+
- uses: actions/checkout@v4
112+
113+
- name: Install Rust
114+
uses: dtolnay/rust-toolchain@stable
115+
with:
116+
components: llvm-tools-preview
117+
118+
- name: Install cargo-llvm-cov
119+
uses: taiki-e/install-action@cargo-llvm-cov
120+
121+
- name: Cache dependencies
122+
uses: actions/cache@v4
123+
with:
124+
path: |
125+
~/.cargo/registry
126+
~/.cargo/git
127+
target
128+
key: ${{ runner.os }}-cargo-coverage-${{ hashFiles('**/Cargo.lock') }}
129+
130+
- name: Generate code coverage
131+
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
132+
133+
- name: Upload coverage to Codecov
134+
uses: codecov/codecov-action@v4
135+
with:
136+
files: lcov.info
137+
fail_ci_if_error: true

0 commit comments

Comments
 (0)