Skip to content

Commit

Permalink
chore: Update README.md (#46)
Browse files Browse the repository at this point in the history
## Summary

Update both README.md and DEVELOPMENT.md with the coverage and
benchmarks sections.
  • Loading branch information
nieomylnieja authored Nov 5, 2024
1 parent ddb940d commit c2b1093
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage-and-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions:
contents: write
jobs:
test:
name: Run unit tests
name: Run coverage and benchmark
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ It also allows writing self-documenting validation rules through a

**GO** **V**alidate **Y**ourself!

**DISCLAIMER** govy is in active development, while the core API is unlikely
**DISCLAIMER**: govy is in active development, while the core API is unlikely
to change, breaking changes may be introduced with new versions until v1
is released. Checkout [roadmap](./docs/ROADMAP.md) for upcoming,
planned features.
Expand All @@ -39,6 +39,8 @@ planned features.
1. [Reflection](#reflection)
2. [Trivia](#trivia)
5. [Development](#development)
1. [Tests coverage](#tests-coverage)
2. [Benchmarks](#benchmarks)
6. [Acknowledgments](#acknowledgments)

## Getting started
Expand Down Expand Up @@ -613,6 +615,19 @@ with them, and the idea for `govy` was born.
Checkout both [contributing guidelines](./docs/CONTRIBUTING.md) and
[development instructions](./docs/DEVELOPMENT.md).

### Tests coverage

Tests coverage HTML for current `main` branch state can be inspected
[here](https://raw.githack.com/wiki/nobl9/govy/coverage.html).

Note that `cmd` package is tested by building and running Go binaries directly.
This means there won't be any coverage for some of the core functions there.

### Benchmarks

Benchmarks' history is collected and can be viewed as charts over time
[here](https://nobl9.github.io/govy/dev/bench/).

## Acknowledgments

The API along with the accompanying nomenclature was heavily inspired by the
Expand Down
22 changes: 22 additions & 0 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,25 @@ Refer to this [README.md](../internal/validation/README.md) for more information
Renovate is configured to automatically merge minor and patch updates.
For major versions, which sadly includes GitHub Actions, manual approval
is required.

## Tests coverage

Tests coverage reporting is automated using the following actions:
- [go-coverage-report](https://github.com/ncruces/go-coverage-report) which
is responsible for updating the coverage badge in main README.md.
It stores the coverage results in GitHub wiki and it can be easily inspected
[here](https://raw.githack.com/wiki/nobl9/govy/coverage.html).
This action is run only on `push` events to _main_ branch.
- [coverdiff](https://github.com/kskitek/coverdiff) which is executed on each
PR runs the tests coverage and posts a summary report as a comment.
It highlights positive and negative changes.

## Benchmarks

[github-action-benchmark](https://github.com/benchmark-action/github-action-benchmark)
is used to collect and store benchmarks' results.
It inspects PRs and if a configured threshold difference between previous
and current results is breached it will leave a comment on the affected PR.

On top of that it publishes benchmarks' history charts onto
[GitHub Pages](https://nobl9.github.io/govy/dev/bench).

0 comments on commit c2b1093

Please sign in to comment.