Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: address PR review feedback for CI speed improvements

Tre Dubravab95f8304eac2
diff --git a/.github/workflows/check-be-ts-and-lint.yml b/.github/workflows/check-be-ts-and-lint.yml
index aa10cdd7fb..0d17b98dfd 100644
--- a/.github/workflows/check-be-ts-and-lint.yml
+++ b/.github/workflows/check-be-ts-and-lint.yml
@@ -19,6 +19,7 @@ jobs:
- name: ☁️ Checkout source
uses: actions/checkout@v4
- name: 🔧 Setup Node 22
+ id: setup-node
uses: actions/setup-node@v4
with:
node-version: "22"
@@ -27,19 +28,19 @@ jobs:
uses: actions/cache@v4
with:
path: backend/node_modules
- key: backend-node-modules-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
+ - name: Install dependencies
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
+ run: npm ci
+ working-directory: backend
- name: 📦 Cache tsbuildinfo
uses: actions/cache@v4
with:
- path: backend/node_modules/.tmp/tsconfig.tsbuildinfo
+ path: backend/.cache/tsconfig.tsbuildinfo
key: backend-tsbuildinfo-${{ github.ref }}-${{ github.sha }}
restore-keys: |
backend-tsbuildinfo-${{ github.ref }}-
backend-tsbuildinfo-
- - name: Install dependencies
- if: steps.cache-node-modules.outputs.cache-hit != 'true'
- run: npm ci
- working-directory: backend
- name: Run type check
run: npm run type:check
working-directory: backend
@@ -53,6 +54,7 @@ jobs:
- name: ☁️ Checkout source
uses: actions/checkout@v4
- name: 🔧 Setup Node 22
+ id: setup-node
uses: actions/setup-node@v4
with:
node-version: "22"
@@ -61,7 +63,7 @@ jobs:
uses: actions/cache@v4
with:
path: backend/node_modules
- key: backend-node-modules-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
diff --git a/.github/workflows/check-fe-ts-and-lint.yml b/.github/workflows/check-fe-ts-and-lint.yml
index 9587987f2b..6a5fcec8ce 100644
--- a/.github/workflows/check-fe-ts-and-lint.yml
+++ b/.github/workflows/check-fe-ts-and-lint.yml
@@ -19,6 +19,7 @@ jobs:
- name: ☁️ Checkout source
uses: actions/checkout@v4
- name: 🔧 Setup Node 22
+ id: setup-node
uses: actions/setup-node@v4
with:
node-version: "22"
@@ -27,19 +28,19 @@ jobs:
uses: actions/cache@v4
with:
path: frontend/node_modules
- key: frontend-node-modules-${{ hashFiles('frontend/package-lock.json') }}
+ key: frontend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('frontend/package-lock.json') }}
+ - name: 📦 Install dependencies
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
+ run: npm ci
+ working-directory: frontend
- name: 📦 Cache tsbuildinfo
uses: actions/cache@v4
with:
- path: frontend/node_modules/.tmp/tsconfig.app.tsbuildinfo
+ path: frontend/.cache/tsconfig.app.tsbuildinfo
key: frontend-tsbuildinfo-${{ github.ref }}-${{ github.sha }}
restore-keys: |
frontend-tsbuildinfo-${{ github.ref }}-
frontend-tsbuildinfo-
- - name: 📦 Install dependencies
- if: steps.cache-node-modules.outputs.cache-hit != 'true'
- run: npm ci
- working-directory: frontend
- name: 🏗️ Run Type check
run: npm run type:check
working-directory: frontend
@@ -53,6 +54,7 @@ jobs:
- name: ☁️ Checkout source
uses: actions/checkout@v4
- name: 🔧 Setup Node 22
+ id: setup-node
uses: actions/setup-node@v4
with:
node-version: "22"
@@ -61,7 +63,7 @@ jobs:
uses: actions/cache@v4
with:
path: frontend/node_modules
- key: frontend-node-modules-${{ hashFiles('frontend/package-lock.json') }}
+ key: frontend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('frontend/package-lock.json') }}
- name: 📦 Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
diff --git a/.github/workflows/run-backend-bdd-tests.yml b/.github/workflows/run-backend-bdd-tests.yml
index 27d2127e62..e5fffbf9e7 100644
--- a/.github/workflows/run-backend-bdd-tests.yml
+++ b/.github/workflows/run-backend-bdd-tests.yml
@@ -36,6 +36,7 @@ jobs:
with:
version: "2.14.2"
- name: 🔧 Setup Node 22
+ id: setup-node
uses: actions/setup-node@v4
with:
node-version: "22"
@@ -55,7 +56,7 @@ jobs:
uses: actions/cache@v4
with:
path: backend/node_modules
- key: backend-node-modules-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
diff --git a/.github/workflows/run-backend-tests.yml b/.github/workflows/run-backend-tests.yml
index ec0cb8e250..153aeeba4d 100644
--- a/.github/workflows/run-backend-tests.yml
+++ b/.github/workflows/run-backend-tests.yml
@@ -32,6 +32,7 @@ jobs:
with:
version: "2.14.2"
- name: 🔧 Setup Node 22
+ id: setup-node
uses: actions/setup-node@v4
with:
node-version: "22"
@@ -40,7 +41,7 @@ jobs:
uses: actions/cache@v4
with:
path: backend/node_modules
- key: backend-node-modules-${{ hashFiles('backend/package-lock.json') }}
+ key: backend-node-modules-${{ runner.os }}-node${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('backend/package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
diff --git a/backend/.gitignore b/backend/.gitignore
index 00425e090d..dbb2683fb4 100644
--- a/backend/.gitignore
+++ b/backend/.gitignore
@@ -1,3 +1,4 @@
dist
+.cache
/wallet
diff --git a/backend/tsconfig.json b/backend/tsconfig.json
index fffc1390fa..c79668ce7e 100644
--- a/backend/tsconfig.json
+++ b/backend/tsconfig.json
@@ -23,7 +23,7 @@
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"incremental": true,
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.tsbuildinfo",
+ "tsBuildInfoFile": "./.cache/tsconfig.tsbuildinfo",
"baseUrl": ".",
"paths": {
"@app/*": ["./src/*"],
diff --git a/frontend/.gitignore b/frontend/.gitignore
index f52343a92d..10fab08e9d 100644
--- a/frontend/.gitignore
+++ b/frontend/.gitignore
@@ -9,6 +9,7 @@ lerna-debug.log*
node_modules
dist
+.cache
dist-ssr
*.local
diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json
index 3dc42b9198..1f6b29873a 100644
--- a/frontend/tsconfig.app.json
+++ b/frontend/tsconfig.app.json
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"incremental": true,
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
+ "tsBuildInfoFile": "./.cache/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2021", "DOM", "DOM.Iterable"],