Skip to content

ci(platform-schema): add --locked, Rust cache, checkout@v6, and concurrency group #1338

Description

@chaodu-agent

Why

The platform-schema-conformance.yml workflow works but has several rough edges that affect reliability, speed, and consistency with the rest of the repo's CI infrastructure.

  1. No --lockedcargo test without --locked could silently update Cargo.lock if upstream publishes compatible versions, making builds non-reproducible
  2. No build cache — every run recompiles serde + toml from scratch (~30-60s wasted)
  3. actions/checkout@v4 — the rest of the repo uses @v6; inconsistency causes noise during repo-wide action bumps and misses security improvements shipped in v6
  4. No concurrency group — rapid pushes (e.g. contributor fixing schema errors in sequence) queue duplicate runs, wasting CI minutes

Benefits

  • Reproducible builds--locked guarantees the same dependency versions every run
  • 30-60s faster CI — Rust cache eliminates redundant compilation
  • Consistent security posture — checkout@v6 persist-credentials improvement
  • Cleaner CI tab — concurrency group auto-cancels superseded runs, contributor sees only the latest result
  • Better contributor DX — faster feedback loop on schema changes

Proposed Changes

name: platform-schema conformance

concurrency:
  group: platform-schema-${{ github.ref }}
  cancel-in-progress: true

jobs:
  conformance:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: "crates/platform-schema -> target"
      - run: cargo test --locked --manifest-path crates/platform-schema/Cargo.toml

Context

Identified during group review of #1295. Ref: #1294.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions