Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: enable CI build caching (#10862)

Nimared217adfc7a8
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 99257b7528..eafd176ec7 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -59,6 +59,14 @@ jobs:
node-version: 24
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
+ - name: Setup Turbo cache
+ uses: actions/cache@v4
+ with:
+ path: .turbo
+ key: ${{ runner.os }}-turbo-lint-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-turbo-lint-
+ ${{ runner.os }}-turbo-
- name: install dependencies
run: |
pnpm i
@@ -192,6 +200,25 @@ jobs:
echo "LANGFUSE_INGESTION_QUEUE_DELAY_MS=1" >> .env
echo "LANGFUSE_CACHE_PROMPT_ENABLED=false" >> .env
echo "LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS=1" >> .env
+ - name: Setup Turbo cache
+ uses: actions/cache@v4
+ with:
+ path: .turbo
+ key: ${{ runner.os }}-turbo-web-sync-${{ matrix.node-version }}-${{ matrix.postgres-version }}-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-turbo-web-sync-${{ matrix.node-version }}-${{ matrix.postgres-version }}-
+ ${{ runner.os }}-turbo-web-sync-${{ matrix.node-version }}-
+ ${{ runner.os }}-turbo-
+ - name: Cache Next.js builds
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.npm
+ ${{ github.workspace }}/web/.next/cache
+ key: ${{ runner.os }}-nextjs-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('web/**/*.js', 'web/**/*.jsx', 'web/**/*.ts', 'web/**/*.tsx') }}
+ restore-keys: |
+ ${{ runner.os }}-nextjs-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
+ ${{ runner.os }}-nextjs-${{ matrix.node-version }}-
- name: Run dev containers
run: |
docker compose -f docker-compose.dev.yml up -d
@@ -271,6 +298,25 @@ jobs:
echo "LANGFUSE_TRACE_DELETE_CONCURRENCY=100" >> .env
echo "ADMIN_API_KEY=admin-api-key" >> .env
echo "LANGFUSE_EE_LICENSE_KEY=langfuse_ee_test" >> .env
+ - name: Setup Turbo cache
+ uses: actions/cache@v4
+ with:
+ path: .turbo
+ key: ${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-${{ matrix.deploy-mode }}-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-${{ matrix.deploy-mode }}-
+ ${{ runner.os }}-turbo-web-async-${{ matrix.node-version }}-${{ matrix.postgres-version }}-
+ ${{ runner.os }}-turbo-
+ - name: Cache Next.js builds
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.npm
+ ${{ github.workspace }}/web/.next/cache
+ key: ${{ runner.os }}-nextjs-async-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('web/**/*.js', 'web/**/*.jsx', 'web/**/*.ts', 'web/**/*.tsx') }}
+ restore-keys: |
+ ${{ runner.os }}-nextjs-async-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
+ ${{ runner.os }}-nextjs-async-${{ matrix.node-version }}-
- name: Run dev containers
run: |
docker compose -f docker-compose.dev${{ matrix.deploy-mode }}.yml up -d
@@ -475,6 +521,24 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME_READ }}
password: ${{ secrets.DOCKERHUB_TOKEN_READ }}
+ - name: Setup Turbo cache
+ uses: actions/cache@v4
+ with:
+ path: .turbo
+ key: ${{ runner.os }}-turbo-e2e-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-turbo-e2e-
+ ${{ runner.os }}-turbo-
+ - name: Cache Next.js builds
+ uses: actions/cache@v4
+ with:
+ path: |
+ ~/.npm
+ ${{ github.workspace }}/web/.next/cache
+ key: ${{ runner.os }}-nextjs-e2e-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('web/**/*.js', 'web/**/*.jsx', 'web/**/*.ts', 'web/**/*.tsx') }}
+ restore-keys: |
+ ${{ runner.os }}-nextjs-e2e-${{ hashFiles('**/pnpm-lock.yaml') }}-
+ ${{ runner.os }}-nextjs-e2e-
- name: install dependencies
run: |
pnpm install
diff --git a/turbo.json b/turbo.json
index 738fe2466f..9c99ebeecb 100644
--- a/turbo.json
+++ b/turbo.json
@@ -1,26 +1,15 @@
{
"$schema": "https://turbo.build/schema.json",
- "globalDependencies": [
- ".env"
- ],
+ "globalDependencies": [".env"],
"envMode": "loose",
"tasks": {
"build": {
- "dependsOn": [
- "db:generate",
- "^build"
- ],
- "outputs": [
- "dist/**",
- ".next/**",
- "!.next/cache/**"
- ],
+ "dependsOn": ["db:generate", "^build"],
+ "outputs": ["dist/**", ".next/**", "!.next/cache/**"],
"cache": true
},
"start": {
- "dependsOn": [
- "^start"
- ]
+ "dependsOn": ["^start"]
},
"db:migrate": {
"cache": false
@@ -33,39 +22,28 @@
"dev": {
"cache": false,
"persistent": true,
- "dependsOn": [
- "db:generate"
- ]
+ "dependsOn": ["db:generate"]
},
"dev:worker": {
"cache": false,
"persistent": true,
- "dependsOn": [
- "db:generate",
- ]
+ "dependsOn": ["db:generate"]
},
"dev:web": {
"cache": false,
"persistent": true,
- "dependsOn": [
- "db:generate"
- ]
+ "dependsOn": ["db:generate"]
},
"db:generate": {
"cache": false,
- "dependsOn": [
- "^db:generate"
- ]
+ "dependsOn": ["^db:generate"]
},
"lint": {
"cache": true,
"outputs": []
},
"test": {
- "dependsOn": [
- "^test",
- "db:generate"
- ],
+ "dependsOn": ["^test", "db:generate"],
"cache": true
},
"worker#dev": {
@@ -73,4 +51,4 @@
"persistent": true
}
}
-}
\ No newline at end of file
+}