diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29f71544..b3980923 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,7 +169,7 @@ jobs: retention-days: 14 contracts: - name: Contracts Build + name: Contracts Build & Test runs-on: ubuntu-latest steps: - name: Checkout code @@ -189,6 +189,12 @@ jobs: - name: Build working-directory: ./contracts run: cargo build + - name: Test + working-directory: ./contracts + env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + run: cargo test -- --nocapture - name: Test (unit + property/fuzz) working-directory: ./contracts # Property tests use a fixed, bounded case count (see diff --git a/docs/governance/CONTRIBUTING.md b/docs/governance/CONTRIBUTING.md index 8a3c5460..cbbce8eb 100644 --- a/docs/governance/CONTRIBUTING.md +++ b/docs/governance/CONTRIBUTING.md @@ -43,6 +43,20 @@ at first. > [CI/CD Pipeline Guide](docs/CICD_GUIDE.md) before making any changes related to secrets, sensitive > data, or smart contracts. +### Local Verification + +> [!IMPORTANT] Before opening a pull request, verify all contract checks pass locally. These are the +> exact commands the CI pipeline runs. + +```bash +cd contracts +cargo fmt --check +cargo clippy +cargo build +cargo test +``` + +Any failure here will also fail the pull-request workflow, so fix issues before submitting. Adding or editing a course lesson? See [docs/backend/CURRICULUM_AUTHORING.md](../backend/CURRICULUM_AUTHORING.md) for the required fields and the `npm run validate:curriculum` command CI