From 3fc3387c3495570fc5c12b6c4d3e8eb75b9e75bc Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Wed, 4 Mar 2026 00:35:04 -0500 Subject: [PATCH] Add GitHub Actions CI workflows for Rust and TypeScript Rust workflow runs fmt, clippy, and test on crate/cargo/openapi changes. TypeScript workflow runs typecheck, test, and build on apps/packages changes. Both use path filters so changes don't cross-trigger. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/rust.yml | 64 ++++++++++++++++++++++++++++++++ .github/workflows/typescript.yml | 56 ++++++++++++++++++++++++++++ .github/zizmor.yml | 6 +++ 3 files changed, 126 insertions(+) create mode 100644 .github/workflows/rust.yml create mode 100644 .github/workflows/typescript.yml create mode 100644 .github/zizmor.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 000000000..261977417 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,64 @@ +name: Rust + +on: + push: + branches: [main] + paths: + - "crates/**" + - "Cargo.toml" + - "Cargo.lock" + - ".cargo/**" + - "openapi/**" + - ".github/workflows/rust.yml" + pull_request: + branches: [main] + paths: + - "crates/**" + - "Cargo.toml" + - "Cargo.lock" + - ".cargo/**" + - "openapi/**" + - ".github/workflows/rust.yml" + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + fmt: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable + with: + components: rustfmt + - run: cargo fmt --check --all + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable + with: + components: clippy + - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2 + - run: cargo clippy --workspace -- -D warnings + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable + - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2 + - run: cargo test --workspace diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml new file mode 100644 index 000000000..cca577c78 --- /dev/null +++ b/.github/workflows/typescript.yml @@ -0,0 +1,56 @@ +name: TypeScript + +on: + push: + branches: [main] + paths: + - "apps/**" + - "packages/**" + - "package.json" + - "bun.lock" + - ".github/workflows/typescript.yml" + pull_request: + branches: [main] + paths: + - "apps/**" + - "packages/**" + - "package.json" + - "bun.lock" + - ".github/workflows/typescript.yml" + +permissions: + contents: read + +jobs: + typecheck: + name: Typecheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2 + - run: bun install + - run: cd apps/arc-web && bun run typecheck + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2 + - run: bun install + - run: cd apps/arc-web && bun test + + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2 + - run: bun install + - run: cd apps/arc-web && bun run build diff --git a/.github/zizmor.yml b/.github/zizmor.yml new file mode 100644 index 000000000..4b0acd4d7 --- /dev/null +++ b/.github/zizmor.yml @@ -0,0 +1,6 @@ +rules: + stale-action-refs: + ignore: + - rust.yml:37 + - rust.yml:49 + - rust.yml:62