diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cf8dc70b47..827fc27b1e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -292,6 +292,15 @@ jobs: with: global-json-file: global.json + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - uses: pnpm/action-setup@v4 + with: + run_install: true + - name: Run ci lint run: cargo ci lint diff --git a/.github/workflows/typescript-lint.yml b/.github/workflows/typescript-lint.yml deleted file mode 100644 index d7f51fae5d5..00000000000 --- a/.github/workflows/typescript-lint.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: TypeScript - Lint - -on: - pull_request: - push: - branches: - - master - merge_group: - -jobs: - build: - runs-on: spacetimedb-new-runner-2 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - uses: pnpm/action-setup@v4 - with: - run_install: true - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Lint - run: pnpm lint diff --git a/tools/ci/README.md b/tools/ci/README.md index c01598359e7..91bca8784f4 100644 --- a/tools/ci/README.md +++ b/tools/ci/README.md @@ -44,7 +44,7 @@ Usage: test Lints the codebase -Runs rustfmt, clippy, csharpier and generates rust docs to ensure there are no warnings. +Runs rustfmt, clippy, csharpier, TypeScript lint, and generates rust docs to ensure there are no warnings. **Usage:** ```bash diff --git a/tools/ci/src/main.rs b/tools/ci/src/main.rs index 1743b67a814..fd6c9ec4238 100644 --- a/tools/ci/src/main.rs +++ b/tools/ci/src/main.rs @@ -218,7 +218,8 @@ enum CiCmd { Test, /// Lints the codebase /// - /// Runs rustfmt, clippy, csharpier and generates rust docs to ensure there are no warnings. + /// Runs rustfmt, clippy, csharpier, TypeScript lint, and generates rust docs to ensure there + /// are no warnings. Lint, /// Tests Wasm bindings /// @@ -428,6 +429,7 @@ fn main() -> Result<()> { cmd!("dotnet", "csharpier", "--check", ".") .dir("crates/bindings-csharp") .run()?; + cmd!("pnpm", "lint").run()?; // `bindings` is the only crate we care strongly about documenting, // since we link to its docs.rs from our website. // We won't pass `--no-deps`, though,