docs: add event schema and Dune analytics guide (#80) #126
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Verify Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - testnet | |
| paths: | |
| - 'contracts/**' | |
| - 'docs/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'rust-toolchain.toml' | |
| - '.github/actions/setup-rust-stellar/**' | |
| - '.github/workflows/verify-build.yml' | |
| # Use pull_request (not pull_request_target): the check must run the workflow | |
| # from the PR head so branch-filter changes take effect on the PR itself, and | |
| # the build/test job needs no secrets, so the pull_request_target foot-gun | |
| # (secrets + write token against PR head code) is avoided. | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| - testnet | |
| paths: | |
| - 'contracts/**' | |
| - 'docs/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'rust-toolchain.toml' | |
| - '.github/actions/setup-rust-stellar/**' | |
| - '.github/workflows/verify-build.yml' | |
| - '.github/workflows/rustfmt.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout your repository using git | |
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Rust and Stellar | |
| uses: ./.github/actions/setup-rust-stellar | |
| - name: Build events contract | |
| run: cd contracts/events && make build | |
| - name: Build profile contract | |
| run: cd contracts/profile && make build | |
| - name: Check WASM sizes (64 KB ceiling) | |
| run: | | |
| for f in target/wasm32v1-none/release/*.wasm; do | |
| size=$(stat -c%s "$f") | |
| name=$(basename "$f") | |
| echo "$name: $size bytes" | |
| if [ "$size" -gt 65536 ]; then | |
| echo "::error::$name exceeds 64 KB ceiling ($size bytes)" | |
| exit 1 | |
| fi | |
| done | |
| - name: Run tests | |
| run: cargo test --release |