From c6854687f92b462d2da589fd4bb7a6f80755c7f7 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:53:07 +0000 Subject: [PATCH 1/4] chore(ci): consolidate lint and test workflows into single CI workflow - Merge lint.yaml and test.yaml into ci.yaml - Add Nix environment initialisation step after setup - Run lint, typecheck, build, and tests in sequence - Reduces workflow overhead by sharing setup steps --- .github/workflows/{lint.yaml => ci.yaml} | 10 ++++++++-- .github/workflows/test.yaml | 23 ----------------------- 2 files changed, 8 insertions(+), 25 deletions(-) rename .github/workflows/{lint.yaml => ci.yaml} (78%) delete mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/ci.yaml similarity index 78% rename from .github/workflows/lint.yaml rename to .github/workflows/ci.yaml index 74c61e60..5c1dab16 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Lint & Type Check +name: CI on: pull_request: @@ -10,7 +10,7 @@ concurrency: cancel-in-progress: true jobs: - lint: + ci: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,6 +19,9 @@ jobs: - name: Setup Nix uses: ./.github/actions/setup-nix + - name: Initialise Nix environment + run: nix develop --command true + - name: Run Lint run: nix develop --command pnpm run lint @@ -27,3 +30,6 @@ jobs: - name: Run Build run: nix develop --command pnpm run build + + - name: Run Tests + run: nix develop --command pnpm test diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index b5e00d77..00000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Tests - -on: - pull_request: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - - name: Setup Nix - uses: ./.github/actions/setup-nix - - - name: Run tests - run: nix develop --command pnpm test From 1fc55e9d734c0c81c7b96874ce6f342440ec6652 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:55:52 +0000 Subject: [PATCH 2/4] perf(nix): skip pnpm install when dependencies are up to date Compare pnpm-lock.yaml timestamp against node_modules/.pnpm/lock.yaml to determine if installation is needed. This avoids redundant installs when entering the Nix development shell multiple times. - Check if node_modules/.pnpm/lock.yaml exists - Compare timestamps using -nt (newer than) - Use --frozen-lockfile to ensure lockfile consistency --- flake.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index e53e3ad0..3333f05b 100644 --- a/flake.nix +++ b/flake.nix @@ -20,8 +20,11 @@ shellHook = '' echo "StackOne AI Node SDK development environment" - # Install dependencies using lockfile - pnpm install --lockfile + # Install dependencies only if node_modules/.pnpm/lock.yaml is older than pnpm-lock.yaml + if [ ! -f node_modules/.pnpm/lock.yaml ] || [ pnpm-lock.yaml -nt node_modules/.pnpm/lock.yaml ]; then + echo "📦 Installing dependencies..." + pnpm install --frozen-lockfile + fi ''; }; } From 2a5c6f598b33e5bccce7a336c3408e179f561b70 Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:56:02 +0000 Subject: [PATCH 3/4] chore(nix): add git and gh to development shell Include version control tools in the Nix development environment for consistent tooling across all developers. --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 3333f05b..b28ac1c6 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,8 @@ devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ pnpm_10 + git + gh ]; shellHook = '' From 7a0a4b81dbe2cd0525fef5ed57cbb9870bd7ff0f Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Tue, 9 Dec 2025 12:56:43 +0000 Subject: [PATCH 4/4] Revert "chore(nix): add git and gh to development shell" This reverts commit 2a5c6f598b33e5bccce7a336c3408e179f561b70. --- flake.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/flake.nix b/flake.nix index b28ac1c6..3333f05b 100644 --- a/flake.nix +++ b/flake.nix @@ -15,8 +15,6 @@ devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ pnpm_10 - git - gh ]; shellHook = ''