Add role contract module with service macro and trybuild tests #71
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
| # Shallow release gates — fast checks for every PR and every release. | |
| # All steps must pass. Failure at any step halts the workflow. | |
| name: Shallow Gates | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_call: # reusable by release workflow | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| shallow-gates: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.94" | |
| components: rustfmt, clippy | |
| - name: Format check (fmt) | |
| id: fmt | |
| run: cargo fmt --check | |
| - name: Compile check (check) | |
| id: check | |
| run: cargo check --all-targets | |
| - name: Lint (clippy) | |
| id: clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Unit and integration tests (test) | |
| id: test | |
| run: cargo test | |
| - name: Documentation (doc) | |
| id: doc | |
| run: cargo doc --no-deps --document-private-items | |
| - name: Publish dry-run (publish_dry_run) | |
| id: publish_dry_run | |
| run: cargo publish -p rust-tokio-supervisor --dry-run | |
| - name: Coding standard check (coding_standard) | |
| id: coding_standard | |
| working-directory: rust-supervisor | |
| run: bash scripts/check-coding-standard.sh | |
| - name: Maintainability check (maintainability) | |
| id: maintainability | |
| working-directory: rust-supervisor | |
| run: bash scripts/check-maintainability.sh | |
| - name: Generate SBOM (generate_sbom) | |
| id: generate_sbom | |
| working-directory: rust-supervisor | |
| run: bash scripts/generate-sbom.sh | |
| - name: Validate SBOM (validate_sbom) | |
| id: validate_sbom | |
| working-directory: rust-supervisor | |
| run: bash scripts/validate-sbom.sh | |
| # ---- Cross-platform compile check (core supervision only on non-Unix) ---- | |
| cross-platform-check: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: "1.94" | |
| - name: Compile check (${{ matrix.os }}) | |
| run: cargo check |