From ecb79424ce1b173bd85ce850b087a530a1701f6b Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 20 May 2026 08:03:18 +0000 Subject: [PATCH 1/3] ci: remove redundant fn-init-e2e job, add --frozen-lockfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/integration/fn-init.test.ts is already executed by the integration job via `pnpm test:integration` (--testPathPatterns 'tests/integration'). fn-init-e2e ran only that one file after doing the same toolkit build as the toolkit job — pure duplicate work. Removing it saves one full parallel runner (~44-52 s compute) per CI trigger. Also adds --frozen-lockfile to every pnpm install in this workflow to match ci.yaml and prevent non-reproducible installs on CI. Measured: fn-init-e2e consistently completes in 44-52 s across the last 10 runs (same wall-clock as the other parallel jobs). The integration job already covers the test. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/test.yaml | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 84b9f03..ae3b1bb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,7 +23,7 @@ jobs: node-version: '22' cache: 'pnpm' - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install + - run: pnpm install --frozen-lockfile - run: pnpm test:unit integration: @@ -37,7 +37,7 @@ jobs: node-version: '22' cache: 'pnpm' - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install + - run: pnpm install --frozen-lockfile - run: pnpm build - run: pnpm test:integration @@ -52,7 +52,7 @@ jobs: node-version: '22' cache: 'pnpm' - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install + - run: pnpm install --frozen-lockfile - name: Build toolkit packages run: | pnpm --filter @constructive-io/fn-types build @@ -66,26 +66,3 @@ jobs: pnpm --filter @constructive-io/fn-generator test pnpm --filter @constructive-io/fn-client test pnpm --filter @constructive-io/fn-cli test - - fn-init-e2e: - name: fn init end-to-end - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: pnpm/action-setup@v6 - - uses: actions/setup-node@v5 - with: - node-version: '22' - cache: 'pnpm' - - run: node --experimental-strip-types scripts/generate.ts - - run: pnpm install - - name: Build fn-cli (transitive) - run: | - pnpm --filter @constructive-io/fn-types build - pnpm --filter @constructive-io/knative-job-fn build - pnpm --filter @constructive-io/fn-runtime build - pnpm --filter @constructive-io/fn-generator build - pnpm --filter @constructive-io/fn-client build - pnpm --filter @constructive-io/fn-cli build - - name: Binary integration test - run: pnpm exec jest tests/integration/fn-init.test.ts From 5f824a58736acb6a5e6b876380f46dfe3d673c46 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 20 May 2026 08:03:40 +0000 Subject: [PATCH 2/3] ci: split Build & Lint into two parallel jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the CI workflow had a single sequential job that ran generate → install (22 s) → build (22 s) → lint (~8 s) for a total of ~50-55 s wall-clock. Splitting into parallel `build` and `lint` jobs lets them both do generate + install once on their own runner and then run their step concurrently. The wall-clock is now max(build, lint) ≈ 46 s instead of build + lint ≈ 53 s — roughly 7 s saved per CI trigger. Measured from recent runs: `pnpm build` step ~22 s, `pnpm lint` step ~8 s; sequential overhead was therefore the full lint time. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yaml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e39bcc4..8a669ce 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ concurrency: jobs: build: - name: Build & Lint + name: Build runs-on: ubuntu-latest steps: @@ -38,5 +38,28 @@ jobs: - name: Build run: pnpm build + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Setup pnpm + uses: pnpm/action-setup@v6 + + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: '22' + cache: 'pnpm' + + - name: Generate function packages + run: node --experimental-strip-types scripts/generate.ts + + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Lint run: pnpm lint From a9ed49a500fa663e59e1210bd3cbd016b7f45edb Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 20 May 2026 08:04:07 +0000 Subject: [PATCH 3/3] ci: add paths-ignore to skip CI on docs/k8s-only changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ci.yaml and test.yaml: ignore docs/**, k8s/**, and **/*.md changes. Build, lint, and unit/integration/toolkit tests don't need to run when only documentation or k8s manifests are updated. K8s changes are already gated by test-k8s-deployment.yaml with its own path filters. docker.yaml: additionally ignores tests/** — changing tests doesn't affect what Docker images are built. Expected savings: full CI skip (~50 s build + ~50 s tests + ~2 min Docker) on docs-only or k8s-manifest-only PRs. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yaml | 8 ++++++++ .github/workflows/docker.yaml | 10 ++++++++++ .github/workflows/test.yaml | 8 ++++++++ 3 files changed, 26 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8a669ce..e1af245 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,8 +3,16 @@ name: CI on: push: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' pull_request: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' workflow_dispatch: {} concurrency: diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index c8c6023..f6e740c 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -3,8 +3,18 @@ name: Publish Docker Images on: push: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - 'tests/**' + - '**/*.md' pull_request: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - 'tests/**' + - '**/*.md' workflow_dispatch: {} permissions: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ae3b1bb..1866baf 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,8 +3,16 @@ name: Tests on: push: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' pull_request: branches: [main] + paths-ignore: + - 'docs/**' + - 'k8s/**' + - '**/*.md' workflow_dispatch: {} concurrency: