Skip to content

Add CI checks: link validation, gitleaks, promtool alert tests, and compose smoke test - #125

Merged
Busiii-adetiba merged 5 commits into
SynapsVault:mainfrom
paulumanyi:drips/80-81-82-83
Oct 19, 2026
Merged

Busiii-adetiba merged 5 commits into
SynapsVault:mainfrom
paulumanyi:drips/80-81-82-83

Conversation

@paulumanyi

Copy link
Copy Markdown
Contributor

Summary

Add CI checks: link validation, gitleaks, promtool alert tests, and compose smoke test

What was solved

#80 — Check Markdown links in docs

Add automated Markdown link checking for docs/ and README.md by introducing a lychee (or markdown-link-check) job to the existing CI workflow, satisfying the acceptance criterion that docs and README links are validated for rot.

Addressed:

  • Changed: .github/workflows/ci.yml, package.json
  • Add lychee or markdown-link-check to validate links in docs/ and README.md
  • Integrate the link check into .github/workflows/ci.yml
  • Scope limited to docs/ and README.md link checking; do not modify unrelated CI jobs or docs content

#81 — Add secret scanning (gitleaks) to CI

Add gitleaks secret scanning to CI for pull requests and introduce a pre-commit hook configuration so accidental commits of Stellar secret keys and DB URLs are caught locally and in CI.

Addressed:

  • Changed: .github/workflows/ci.yml, .pre-commit-config.yaml, .pre-commit-config.yaml
  • Add a gitleaks secret-scanning job/step to .github/workflows/ci.yml that runs on pull requests
  • Add a pre-commit hook configuration (e.g., .pre-commit-config.yaml) wired to gitleaks
  • Keep changes scoped to secret scanning; do not refactor unrelated CI jobs or workflows

#82 — Unit-test Prometheus alert rules with promtool

Add promtool unit tests for the Prometheus alert rules covering BackendDown, 5xx rate, and BackupStale, and wire promtool test rules into CI. Requires reading monitoring/alert-rules.yml to match exact alert names, expressions, and labels, then creating monitoring/tests/*.yml with input series and expected alerts, plus a CI step in .github/workflows/ci.yml to run the tests.

Addressed:

  • Changed: monitoring/tests/alert-rules.test.yml, monitoring/tests/alert-rules.test.yml, .github/workflows/ci.yml
  • Add monitoring/tests/*.yml files consumable by promtool test rules
  • Cover the BackendDown alert with test input series and expected firing state
  • Cover the 5xx rate alert with test input series and expected firing state

#83 — Smoke-test docker-compose startup in CI

Extend the CI workflow to perform a real docker-compose startup smoke test: check out the app repos, bring the stack up with docker compose up -d --wait (relying on healthchecks), run scripts/06-smoke-test.js, and tear down. Adjust docker-compose.yml if needed so healthchecks/wiring support --wait.

Addressed:

  • Changed: .github/workflows/ci.yml, docker-compose.yml, scripts/06-smoke-test.js
  • Modify .github/workflows/ci.yml to add a job/step that checks out app repos, runs docker compose up -d --wait, executes scripts/06-smoke-test.js, and tears down (e.g., docker compose down -v) even on failure.
  • Ensure docker-compose.yml defines healthchecks for services so --wait is meaningful, and fix any broken wiring that prevents a real startup.
  • Keep existing docker compose config validation intact; do not remove current CI steps.

Changes

  • .pre-commit-config.yaml (create)
  • scripts/06-smoke-test.js (modify)
  • package.json (modify)
  • docker-compose.yml (modify)
  • .github/workflows/ci.yml (modify)
  • monitoring/tests/alert-rules.test.yml (create)

Approach

  1. Check Markdown links in docs #80 — Check Markdown links in docs (Changed: .github/workflows/ci.yml, package.json)
  2. Add secret scanning (gitleaks) to CI #81 — Add secret scanning (gitleaks) to CI (Changed: .github/workflows/ci.yml, .pre-commit-config.yaml, .pre-commit-config.yaml)
  3. Unit-test Prometheus alert rules with promtool #82 — Unit-test Prometheus alert rules with promtool (Changed: monitoring/tests/alert-rules.test.yml, monitoring/tests/alert-rules.test.yml, .github/workflows/ci.yml)
  4. Smoke-test docker-compose startup in CI #83 — Smoke-test docker-compose startup in CI (Changed: .github/workflows/ci.yml, docker-compose.yml, scripts/06-smoke-test.js)

Issues

Closes #80
Closes #81
Closes #82
Closes #83

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@paulumanyi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Busiii-adetiba
Busiii-adetiba merged commit b30c86c into SynapsVault:main Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants