From 6c545e9ce17de320f093f0e4595666e0df3dcebe Mon Sep 17 00:00:00 2001 From: Brett Adams Date: Sun, 12 Jul 2026 14:20:56 +1000 Subject: [PATCH] Add PR-time CI workflow for build, lint, and typecheck Build/typecheck previously only ran during the publish pipeline on pushes to main, so a broken PR could merge silently and only surface as a failed release later. This adds a pull_request (and push to main) workflow that installs, lints, builds, and typechecks every package, mirroring the publish workflow's pnpm/Node setup steps to keep the two consistent. iobroker.teslemetry's typecheck script is named `check` rather than `tsc`, so it needs its own step alongside the `pnpm -r --no-bail tsc` run that covers the other four packages. --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6bf72e8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build, Lint & Typecheck + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 9 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + cache: "pnpm" + + - name: Install Dependencies + run: pnpm install --frozen-lockfile + + - name: Lint + run: pnpm lint + + - name: Build + run: pnpm -r run build + + - name: Typecheck + run: pnpm -r --no-bail tsc + + - name: Typecheck (iobroker.teslemetry) + run: pnpm --filter iobroker.teslemetry check