Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
63daada
Add speckit to the repository.
sgmv Jan 20, 2026
58197ac
Added documentation about the project.
sgmv Jan 20, 2026
b1dbc02
update tokio version
sgmv Jan 21, 2026
424a0b2
remove unused deps
sgmv Jan 21, 2026
bdfb03d
feat: Add comprehensive functional test suite specification
sgmv Jan 21, 2026
712f61d
Add plan
sgmv Jan 21, 2026
7766950
Add tasks
sgmv Jan 21, 2026
7cf8dbc
Add tests, second stage
sgmv Jan 21, 2026
6e7c2f7
Add tests, third stage
sgmv Jan 21, 2026
1c71202
update docs
sgmv Jan 21, 2026
0c1eccf
feat: Add comprehensive test suite for Phases 6-9
sgmv Jan 21, 2026
da31587
update docs
sgmv Jan 21, 2026
efaee16
Add Makefile and add more tests
sgmv Jan 22, 2026
2c3b1f7
update coverage to 95%
sgmv Jan 22, 2026
09f90e1
add ci stage
sgmv Jan 22, 2026
737a0f5
update ci stage
sgmv Jan 22, 2026
00b391c
update ci stage 2
sgmv Jan 22, 2026
34a2fb5
fix ci
sgmv Jan 22, 2026
d2f2121
align ci with the Makefile
sgmv Jan 22, 2026
bb956d6
comment unfixed issues
sgmv Jan 22, 2026
6d42d99
Merge branch 'main' into 002-functional-test-suite
sgmv Jan 22, 2026
dba1ab2
fix integration tests and fixtures
sgmv Jan 22, 2026
bed1848
fix for ci
sgmv Jan 23, 2026
3f1a41c
fix tests for ci
sgmv Jan 23, 2026
c62814a
change the docker images
sgmv Jan 23, 2026
7595c4e
change the docker images
sgmv Jan 23, 2026
896ed4b
change the docker images
sgmv Jan 23, 2026
01b8809
test_config_loading_from_multiple_sources fixed
bakhterets Jan 28, 2026
2839ba7
Revert "test_config_loading_from_multiple_sources fixed"
sgmv Jan 28, 2026
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
46 changes: 46 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Git
.git
.gitignore

# CI/CD
.github
zuul.yaml
.pre-commit-config.yaml

# IDE/Editor
.vscode/
.idea/
*.iml
*.swp
*.swo

# Rust build artifacts
target/
**/*.rs.bk

# Documentation
docs/
doc/
README.md
CONTRIBUTING.md
LICENSE

# Test artifacts
tests/
coverage/
tarpaulin-report.html
cobertura.xml

# Configuration
config.yaml
conf.d/

# Logs
*.log

# Specs and planning
specs/
.specify/

# Environment
.env*
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Execute tests and coverage

on:
push:
branches:
- main
- master
pull_request:

env:
CARGO_TERM_COLOR: 'always'

jobs:
test:
runs-on: ubuntu-latest
container:
image: rust:latest
steps:
- uses: actions/checkout@v4

# Temporarily disabled linting and formatting checks, to be re-enabled later.
# - name: Check formatting
# run: make fmt-check
#
# - name: Run linter
# run: make lint

- name: Run tests
run: make test

coverage:
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:0.35.1
options: --security-opt seccomp=unconfined
needs: test
steps:
- uses: actions/checkout@v4


- name: Run tests with coverage
run: make coverage-check
60 changes: 0 additions & 60 deletions .github/workflows/mdbook.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ conf.d
*.iml

# Ignore documentation output folder
docs/
docs/

# Coverage reports
coverage/
tarpaulin-report.html
cobertura.xml
219 changes: 219 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
# Makefile for cloudmon-metrics
# Rust project build, test, and quality automation

.PHONY: all build build-release build-convertor build-reporter \
test test-verbose coverage coverage-html \
fmt fmt-check lint lint-fix clean check \
doc doc-serve doc-open doc-api help install-tools

# Binary names
CONVERTOR_BIN = cloudmon-metrics-convertor
REPORTER_BIN = cloudmon-metrics-reporter

# Tool versions
TARPAULIN_VERSION = 0.35.1

# Default target
all: fmt-check lint test build

# ============================================================================
# Build targets
# ============================================================================

## Build all debug binaries
build:
cargo build

## Build all release binaries (optimized)
build-release:
cargo build --release

## Build only the convertor binary (debug)
build-convertor:
cargo build --bin $(CONVERTOR_BIN)

## Build only the reporter binary (debug)
build-reporter:
cargo build --bin $(REPORTER_BIN)

## Build only the convertor binary (release)
build-convertor-release:
cargo build --release --bin $(CONVERTOR_BIN)

## Build only the reporter binary (release)
build-reporter-release:
cargo build --release --bin $(REPORTER_BIN)

## Check code compiles without producing binaries (faster)
check:
cargo check

# ============================================================================
# Test targets
# ============================================================================

## Run all tests (including binary targets)
test:
cargo test --all-targets

## Run tests with verbose output
test-verbose:
cargo test -- --nocapture

## Run tests with specific filter (usage: make test-filter FILTER=test_name)
test-filter:
cargo test $(FILTER)

# ============================================================================
# Code coverage
# ============================================================================

## Run tests with coverage (requires cargo-tarpaulin)
coverage:
cargo tarpaulin --lib --tests --exclude-files 'src/bin/*' --out Stdout --skip-clean

## Generate HTML coverage report
coverage-html:
cargo tarpaulin --lib --tests --exclude-files 'src/bin/*' --out Html --output-dir target/coverage --skip-clean
@echo "Coverage report generated at target/coverage/tarpaulin-report.html"

## Run coverage with 95% threshold enforcement (library code only)
coverage-check:
cargo tarpaulin --lib --tests --exclude-files 'src/bin/*' --fail-under 95 --skip-clean

# ============================================================================
# Code formatting
# ============================================================================

## Format code using rustfmt
fmt:
cargo fmt

## Check formatting without making changes
fmt-check:
cargo fmt -- --check

# ============================================================================
# Linting
# ============================================================================

## Run clippy linter with warnings as errors
lint:
cargo clippy -- -D warnings

## Run clippy and automatically fix warnings where possible
lint-fix:
cargo clippy --fix --allow-dirty --allow-staged

# ============================================================================
# Documentation
# ============================================================================

## Build mdbook documentation
doc:
mdbook build doc/

## Serve documentation locally with live reload
doc-serve:
mdbook serve doc/

## Open documentation in browser
doc-open:
mdbook build doc/ --open

## Generate Rust API documentation
doc-api:
cargo doc --no-deps

## Generate and open Rust API documentation in browser
doc-api-open:
cargo doc --no-deps --open

## Clean generated documentation
doc-clean:
rm -rf docs/*

# ============================================================================
# Cleanup
# ============================================================================

## Clean build artifacts
clean:
cargo clean

## Clean and remove Cargo.lock (full clean)
clean-all: clean
rm -f Cargo.lock

# ============================================================================
# Development helpers
# ============================================================================

## Install required development tools
install-tools:
rustup component add rustfmt clippy
cargo install cargo-tarpaulin --version $(TARPAULIN_VERSION)
cargo install mdbook mdbook-mermaid mdbook-linkcheck

## Run all quality checks (CI simulation)
ci: fmt-check lint test coverage-check

## Watch for changes and run tests (requires cargo-watch)
watch:
cargo watch -x test

## Update dependencies
update:
cargo update

# ============================================================================
# Help
# ============================================================================

## Show this help message
help:
@echo "Available targets:"
@echo ""
@echo " Build:"
@echo " build - Build all debug binaries"
@echo " build-release - Build all release binaries (optimized)"
@echo " build-convertor - Build convertor binary (debug)"
@echo " build-reporter - Build reporter binary (debug)"
@echo " build-convertor-release - Build convertor binary (release)"
@echo " build-reporter-release - Build reporter binary (release)"
@echo " check - Check code compiles without producing binaries"
@echo ""
@echo " Test:"
@echo " test - Run all tests"
@echo " test-verbose - Run tests with verbose output"
@echo " test-filter - Run tests matching FILTER (usage: make test-filter FILTER=name)"
@echo ""
@echo " Coverage:"
@echo " coverage - Run tests with coverage report"
@echo " coverage-html - Generate HTML coverage report"
@echo " coverage-check - Run coverage with 95% threshold"
@echo ""
@echo " Code Quality:"
@echo " fmt - Format code"
@echo " fmt-check - Check code formatting"
@echo " lint - Run clippy linter"
@echo " lint-fix - Fix linter warnings automatically"
@echo ""
@echo " Documentation:"
@echo " doc - Build mdbook documentation"
@echo " doc-serve - Serve documentation locally with live reload"
@echo " doc-open - Build and open documentation in browser"
@echo " doc-api - Generate Rust API documentation"
@echo " doc-api-open - Generate and open Rust API docs in browser"
@echo " doc-clean - Clean generated documentation"
@echo ""
@echo " Utilities:"
@echo " clean - Clean build artifacts"
@echo " clean-all - Clean everything including Cargo.lock"
@echo " install-tools - Install required development tools"
@echo " ci - Run all CI checks (fmt, lint, test, coverage)"
@echo " watch - Watch for changes and run tests"
@echo " update - Update dependencies"
@echo ""
@echo " Default (all):"
@echo " fmt-check lint test build"
Loading