Skip to content

chore(soroban): doc amount-bounds #184

chore(soroban): doc amount-bounds

chore(soroban): doc amount-bounds #184

Workflow file for this run

name: Test Coverage
on:
push:
branches: [main, "audit/**", "test/**"]
pull_request:
branches: [main]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install tarpaulin
run: cargo install cargo-tarpaulin --locked
- name: Run tests
run: cargo test --verbose
- name: Generate coverage report
run: cargo tarpaulin --config tarpaulin.toml
- name: Upload coverage reports
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
- name: Check coverage threshold (≥ 95 %)
run: |
<<<<<<< fix/consolidated-improvements

Check failure on line 37 in .github/workflows/coverage.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/coverage.yml

Invalid workflow file

You have an error in your yaml syntax on line 37
COVERAGE=$(cargo tarpaulin --out Stdout | grep -oP '\d+\.\d+(?=% coverage)' | head -1)
echo "Current coverage: $COVERAGE%"
# Note: 92%+ is acceptable given Soroban SDK event publishing limitations
# Functional coverage of business logic is 100%
if (( $(echo "$COVERAGE >= 95.0" | bc -l) )); then
echo "✅ Coverage threshold met: $COVERAGE% >= 95%"
exit 0
else
echo "❌ Coverage below threshold: $COVERAGE% < 95%"
=======
COVERAGE=$(cargo tarpaulin --config tarpaulin.toml 2>&1 \
| grep -oP '\d+\.\d+(?=% coverage)' | head -1)
echo "Current coverage: ${COVERAGE}%"
if [ -z "$COVERAGE" ]; then
echo "❌ Could not parse coverage output"
exit 1
fi
if awk "BEGIN { exit !($COVERAGE >= 95.0) }"; then
echo "✅ Coverage threshold met: ${COVERAGE}% >= 95%"
else
echo "❌ Coverage below threshold: ${COVERAGE}% < 95%"
>>>>>>> main
exit 1
fi