Skip to content

docs: complete Taylor-kay documentation issues (#727, #729, #726, #722) #316

docs: complete Taylor-kay documentation issues (#727, #729, #726, #722)

docs: complete Taylor-kay documentation issues (#727, #729, #726, #722) #316

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
# Closes #555: catch newly-disclosed CVEs between PRs, not just on push.
schedule:
- cron: '0 6 * * 1'
jobs:
changelog-check:
name: CHANGELOG updated
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Check CHANGELOG.md was updated
run: |
# Require CHANGELOG.md to be touched whenever src/ is modified.
SRC_CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '^(src/|veritixpay/contract/token/src/)' | wc -l || true)
CHANGELOG_CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -E '^CHANGELOG\.md$' | wc -l || true)
if [ "$SRC_CHANGED" -gt "0" ] && [ "$CHANGELOG_CHANGED" -eq "0" ]; then
echo "❌ This PR modifies src/ but CHANGELOG.md was not updated."
echo ""
echo "Please add an entry under [Unreleased] in CHANGELOG.md describing your change."
echo "See https://keepachangelog.com for format guidance."
exit 1
fi
echo "✅ CHANGELOG check passed (src changed: $SRC_CHANGED, changelog changed: $CHANGELOG_CHANGED)"
contract-ci:
runs-on: ubuntu-latest
defaults:
run:
working-directory: veritixpay/contract/token
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown,wasm32v1-none
- name: Install Stellar CLI
run: cargo install stellar-cli --version 22.8.1 --locked
- name: Preflight
run: make preflight
- name: Build
run: make build
- name: Check WASM size (max 100KB)
run: |
wasm_file=$(ls ../../target/wasm32v1-none/release/*.wasm | head -1)
size=$(stat -c%s "$wasm_file" 2>/dev/null || stat -f%z "$wasm_file" 2>/dev/null)
max_size=$((100 * 1024))
echo "WASM size: $size bytes"
if [ "$size" -gt "$max_size" ]; then
echo "❌ WASM size $size bytes exceeds 100KB limit"
exit 1
fi
echo "✅ WASM size OK ($size bytes)"
- name: Test
run: make test
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --locked
- name: Coverage (min 80%)
run: |
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
cargo llvm-cov --all-features --workspace --fail-under-lines 80
- name: Clippy
run: cargo clippy --all -- -D warnings
- name: Rustfmt
run: cargo fmt --all --check
root-contract-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown,wasm32v1-none
- name: Install Stellar CLI
run: cargo install stellar-cli --version 22.8.1 --locked
- name: Build
run: cargo build --all-targets --all-features
- name: Test
run: cargo test --all-targets --all-features
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Rustfmt
run: cargo fmt --all --check