Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: CI

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable, beta, nightly]

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

Comment on lines +25 to +30
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update deprecated GitHub Actions.
actions-rs/toolchain@v1 uses a deprecated runtime. Switch to dtolnay/rust-toolchain.

Apply this diff:

-    - name: Install Rust
-      uses: actions-rs/toolchain@v1
-      with:
-        toolchain: ${{ matrix.rust }}
-        override: true
-        components: rustfmt, clippy
+    - name: Install Rust
+      uses: dtolnay/rust-toolchain@master
+      with:
+        toolchain: ${{ matrix.rust }}
+        components: rustfmt, clippy
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
🧰 Tools
🪛 actionlint (1.7.7)

25-25: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/ci.yml around lines 25-30, the step uses the deprecated
actions-rs/toolchain@v1; replace it with dtolnay/rust-toolchain (e.g.,
dtolnay/rust-toolchain@stable) and pass the same toolchain input (toolchain: ${{
matrix.rust }}) and components (components: rustfmt, clippy); remove or omit the
legacy override input if dtolnay/rust-toolchain does not support it, ensuring
the new action's documented inputs are used.

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Install dependencies (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev pkg-config

- name: Check formatting
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build --verbose --all

- name: Run tests
run: cargo test --verbose --all

- name: Run integration tests
run: cargo test --test integration_tests

benchmark:
name: Benchmark
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

Comment on lines +79 to +83
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Same: modernize toolchain action in benchmark job.

Apply this diff:

-    - name: Install Rust
-      uses: actions-rs/toolchain@v1
-      with:
-        toolchain: stable
-        override: true
+    - name: Install Rust
+      uses: dtolnay/rust-toolchain@stable
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
🧰 Tools
🪛 actionlint (1.7.7)

79-79: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 79 to 83: modernize the benchmark job's
Rust toolchain step by replacing uses: actions-rs/toolchain@v1 with uses:
actions-rs/toolchain@v2 while preserving the existing inputs (toolchain: stable
and override: true); update the line only to reference v2 so the workflow uses
the current action version.

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Run benchmarks
run: cargo bench

security:
name: Security Audit
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

Comment on lines +113 to +117
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update toolchain action in security job.

Apply this diff:

-    - name: Install Rust
-      uses: actions-rs/toolchain@v1
-      with:
-        toolchain: stable
-        override: true
+    - name: Install Rust
+      uses: dtolnay/rust-toolchain@stable
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
🧰 Tools
🪛 actionlint (1.7.7)

113-113: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/ci.yml around lines 113 to 117, update the security job's
toolchain step by replacing the existing action block with a step using
actions-rs/toolchain@v1 and setting with: toolchain: stable and override: true;
ensure the YAML indentation and surrounding step structure remain valid so the
job picks up the stable Rust toolchain override.

- name: Install cargo-audit
run: cargo install cargo-audit

- name: Run security audit
run: cargo audit

coverage:
name: Coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

Comment on lines +132 to +136
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update toolchain action in coverage job.

Apply this diff:

-    - name: Install Rust
-      uses: actions-rs/toolchain@v1
-      with:
-        toolchain: stable
-        override: true
+    - name: Install Rust
+      uses: dtolnay/rust-toolchain@stable
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
🧰 Tools
🪛 actionlint (1.7.7)

132-132: the runner of "actions-rs/toolchain@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/ci.yml around lines 132 to 136, update the coverage job's
Rust toolchain action reference to the maintained version: replace the current
uses: actions-rs/toolchain@v1 with a specific up-to-date tag such as uses:
actions-rs/toolchain@v1.5 (or the latest patch release), keeping the same with:
toolchain: stable and override: true entries so the workflow uses the maintained
action release.

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Generate coverage report
run: cargo tarpaulin --out Xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./cobertura.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
Comment on lines +143 to +149
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update Codecov action to v4.
v3 is deprecated.

Apply this diff:

-    - name: Upload coverage to Codecov
-      uses: codecov/codecov-action@v3
-      with:
-        file: ./cobertura.xml
-        flags: unittests
-        name: codecov-umbrella
-        fail_ci_if_error: false
+    - name: Upload coverage to Codecov
+      uses: codecov/codecov-action@v4
+      with:
+        files: ./cobertura.xml
+        flags: unittests
+        name: codecov-umbrella
+        fail_ci_if_error: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./cobertura.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./cobertura.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
🧰 Tools
🪛 actionlint (1.7.7)

144-144: the runner of "codecov/codecov-action@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/ci.yml around lines 143 to 149: the Codecov GitHub Action is
pinned to the deprecated v3; update the action to the latest v4 by changing the
uses line to codecov/codecov-action@v4 and keep the existing inputs (file,
flags, name, fail_ci_if_error) intact or adjust input keys to v4 naming if the
action docs require it; commit the change and run CI to verify the new action
accepts the provided inputs.

59 changes: 59 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2024-01-XX

### Added
- Complete rewrite of the key-value store with production-ready features
- Transaction support with ACID compliance
- Multiple serialization formats (JSON, Bincode, MessagePack)
- Comprehensive CLI with subcommands
- Interactive mode for database operations
- Configuration management with TOML files and environment variables
- Structured logging with tracing
- Import/export functionality for JSON data
- Backup and restore capabilities
- In-memory and persistent file-based storage engines
- Comprehensive test suite with integration tests
- Performance benchmarks
- GitHub Actions CI/CD pipeline
- Security audit integration
- Code coverage reporting
- Cross-platform support (Windows, macOS, Linux)

### Changed
- Upgraded from Rust 2018 to Rust 2021 edition
- Modernized dependencies with latest stable versions
- Improved error handling with custom error types
- Enhanced performance with optimized data structures

### Removed
- Legacy simple text-based storage format
- Old CLI argument parsing
- Deprecated dependencies

## [0.1.0] - 2023-XX-XX

### Added
- Initial simple key-value store implementation
- Basic CLI with path, key, and value arguments
- Simple file-based storage with tab-separated format
- Basic HashMap-based in-memory operations

---

## Future Releases

### Planned Features
- Distributed storage support
- REST API server
- WebSocket support
- Advanced indexing
- Compression support
- Encryption at rest
- Replication
- Clustering support
Loading
Loading