Harden ACS beta runtime and SDK contracts #50
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: Static analysis | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| static-analysis: | |
| name: Static analysis | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: npm | |
| cache-dependency-path: sdk/node/package-lock.json | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Install stable Rust | |
| run: | | |
| rustup toolchain install stable --profile minimal --component rustfmt --component clippy | |
| rustup default stable | |
| - name: Rust formatting | |
| run: cargo fmt --all -- --check | |
| - name: Rust clippy | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: TypeScript static check | |
| working-directory: sdk/node | |
| run: | | |
| npm ci | |
| cat > native.d.ts <<'TS' | |
| export class NativeRuntime { | |
| constructor(...args: unknown[]); | |
| static fromPath(...args: unknown[]): NativeRuntime; | |
| static fromManifestChain(...args: unknown[]): NativeRuntime; | |
| evaluate(request: Record<string, unknown>): Promise<Record<string, unknown>>; | |
| } | |
| TS | |
| cat > native.js <<'JS' | |
| module.exports = {}; | |
| JS | |
| npx tsc -p tsconfig.json --noEmit | |
| rm -f native.d.ts native.js | |
| - name: .NET build analyzers | |
| run: dotnet build sdk/dotnet/AgentControlSpecification.sln --nologo -warnaserror |