57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Rust professionalization check
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'adk-rust/crates/detmir-core/**'
|
|
- 'adk-rust/crates/detmir-portal/**'
|
|
- 'scripts/check_private_config_guard.sh'
|
|
- 'scripts/check_portal_contract_sync.mjs'
|
|
- '.github/workflows/rust-professionalization-check.yml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
rust-check:
|
|
name: changed Rust crates smoke
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 40
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust 1.85 with rustfmt and clippy
|
|
run: |
|
|
rustup toolchain install 1.85.0 --profile minimal --component rustfmt --component clippy
|
|
rustup default 1.85.0
|
|
cargo --version
|
|
rustc --version
|
|
|
|
- name: Cargo fmt check
|
|
working-directory: adk-rust
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Test detmir-core
|
|
working-directory: adk-rust
|
|
run: cargo test -p detmir-core
|
|
|
|
- name: Test detmir-portal
|
|
working-directory: adk-rust
|
|
run: cargo test -p detmir-portal
|
|
|
|
- name: Clippy detmir-core
|
|
working-directory: adk-rust
|
|
run: cargo clippy -p detmir-core --all-targets -- -D warnings
|
|
|
|
- name: Clippy detmir-portal
|
|
working-directory: adk-rust
|
|
run: cargo clippy -p detmir-portal --all-targets -- -D warnings
|
|
|
|
- name: Private config guard
|
|
run: bash scripts/check_private_config_guard.sh
|
|
|
|
- name: Portal contract sync
|
|
run: node scripts/check_portal_contract_sync.mjs
|