Skip to content

feat: add embedded examples for configuration files#626

Merged
creativeprojects merged 1 commit into
masterfrom
embed-examples
Apr 11, 2026
Merged

feat: add embedded examples for configuration files#626
creativeprojects merged 1 commit into
masterfrom
embed-examples

Conversation

@creativeprojects

Copy link
Copy Markdown
Owner

No description provided.

@codecov

codecov Bot commented Apr 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.97%. Comparing base (708ed65) to head (d4f0733).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #626   +/-   ##
=======================================
  Coverage   80.97%   80.97%           
=======================================
  Files         162      162           
  Lines       12084    12084           
=======================================
  Hits         9785     9785           
  Misses       1804     1804           
  Partials      495      495           
Flag Coverage Δ
unittests 79.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@creativeprojects creativeprojects marked this pull request as ready for review April 11, 2026 19:46
Copilot AI review requested due to automatic review settings April 11, 2026 19:46
@creativeprojects creativeprojects added this to the v0.34.0 milestone Apr 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the repository’s configuration examples available via embed.FS and updates JSON schema validation tests to consume those embedded examples (rather than relying on walking the repo’s filesystem).

Changes:

  • Added examples package exposing an embedded filesystem containing example configuration files.
  • Updated JSON schema validation tests to walk/read example configs from examples.Files via io/fs.
  • Refactored JSON rewrite helper to convert configs to JSON from in-memory content (viper.ReadConfig) instead of reading from disk.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
examples/examples.go Introduces an embedded FS (Files) containing example config files (*.conf/*.toml/*.yaml/*.json/*.hcl).
config/jsonschema/schema_test.go Switches schema validation tests to use embedded example configs and embeds local invalid configs for the “invalid” subtests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@creativeprojects creativeprojects merged commit 38e50b1 into master Apr 11, 2026
12 checks passed
@creativeprojects creativeprojects deleted the embed-examples branch April 11, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants