Skip to content

Commit 33696e6

Browse files
committed
Complete Production Readiness v0.2 (#200): golden_path, coverage artifacts, release-drafter tags, deps
1 parent 0944e9b commit 33696e6

10 files changed

Lines changed: 191 additions & 374 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,28 @@ jobs:
218218
--exclude cargo-rustapi \
219219
--timeout 900 \
220220
--out Html \
221+
--out Xml \
221222
--output-dir coverage
222223
223224
- name: Upload coverage report
224225
uses: actions/upload-artifact@v4
225226
with:
226227
name: coverage-report
227-
path: coverage/tarpaulin-report.html
228+
path: |
229+
coverage/tarpaulin-report.html
230+
coverage/cobertura.xml
231+
retention-days: 30
232+
233+
- name: Coverage summary
234+
run: |
235+
if [ -f coverage/tarpaulin-report.html ]; then
236+
pct=$(grep -oP '(?<=<h1>Tarpaulin coverage report</h1>.*?)[0-9.]+%' coverage/tarpaulin-report.html | head -1 || true)
237+
echo "## Coverage" >> "$GITHUB_STEP_SUMMARY"
238+
echo "Download the **coverage-report** artifact for the full HTML report." >> "$GITHUB_STEP_SUMMARY"
239+
if [ -n "$pct" ]; then
240+
echo "Line coverage: **${pct}**" >> "$GITHUB_STEP_SUMMARY"
241+
fi
242+
fi
228243
229244
230245

.github/workflows/release-drafter.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
tags:
8+
- 'v*'
79
pull_request:
810
types: [opened, reopened, synchronize]
911

@@ -16,12 +18,25 @@ jobs:
1618
contents: write # write releases
1719
pull-requests: read
1820
runs-on: ubuntu-latest
19-
if: github.event_name == 'push'
21+
if: github.event_name == 'push' && github.ref_type == 'branch'
2022
steps:
2123
- uses: release-drafter/release-drafter@v7
2224
with:
2325
token: ${{ secrets.GITHUB_TOKEN }}
2426

27+
publish_release:
28+
permissions:
29+
contents: write
30+
runs-on: ubuntu-latest
31+
if: github.event_name == 'push' && github.ref_type == 'tag'
32+
steps:
33+
- uses: release-drafter/release-drafter@v7
34+
with:
35+
publish: true
36+
tag: ${{ github.ref_name }}
37+
name: ${{ github.ref_name }}
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
2540
update_pr_label:
2641
permissions:
2742
contents: read

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- **`golden_path` example** (`crates/rustapi-rs/examples/golden_path.rs`) — minimal production-shaped service with `production_defaults`, health probes, and graceful shutdown.
13+
1014
### Changed
1115

16+
- **Production Readiness v0.2** ([#200](https://github.com/Tuntii/RustAPI/issues/200)): coverage CI publishes HTML + Cobertura artifacts with job summary; release-drafter publishes drafts on `v*` tags; README links [Production Checklist](docs/PRODUCTION_CHECKLIST.md) in the header.
17+
- Dependency updates: `actions/checkout@v7`, `actions/cache@v6`, `brotli` 8, `rcgen` 0.14, `tera` 2, `thiserror` 2, OpenTelemetry 0.32 stack, `sqlx` 0.9, `tracing-opentelemetry` 0.33.
1218
- Default `rustapi-rs` dependency tree slimmed from ~259 to ~158 transitive crates by removing always-on `tracing-subscriber` and gating `rust-i18n` behind the `i18n` feature (English fallbacks by default).
1319
- `RustApi::new()` no longer auto-initializes `tracing-subscriber`; initialize tracing in `main` (CLI templates already do).
1420
- Removed unused `screenshots` / `image` / `base64` dev-dependencies that pulled vulnerable `quick-xml` transitives into `cargo audit`.

0 commit comments

Comments
 (0)