From 212bd50e3d5a54bee072177753c71c0e30d38c4e Mon Sep 17 00:00:00 2001 From: Piotr Witek <739075+piotrwitek@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:33:37 +0100 Subject: [PATCH] Added a new build:apps workflow to fix flaky CI runs becaue apps are making async calls during the build. (#554) --- apps/earn-protocol-landing-page/package.json | 2 +- apps/earn-protocol/package.json | 2 +- package.json | 4 ++-- turbo.json | 11 +++++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/earn-protocol-landing-page/package.json b/apps/earn-protocol-landing-page/package.json index e3ced489b..069a121ca 100644 --- a/apps/earn-protocol-landing-page/package.json +++ b/apps/earn-protocol-landing-page/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "scripts": { "dev": "dotenv -e ../../.env -e ../../.env.local -- next dev -p 3003 --turbo", - "build:async": "dotenv -e ../../.env -e ../../.env.local -- next build", + "build:apps": "dotenv -e ../../.env -e ../../.env.local -- next build", "start": "next start -p 3003", "lint": "eslint ." }, diff --git a/apps/earn-protocol/package.json b/apps/earn-protocol/package.json index 88b093597..1cf4abd1c 100644 --- a/apps/earn-protocol/package.json +++ b/apps/earn-protocol/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "scripts": { "dev": "dotenv -e ../../.env -e ../../.env.local -- next dev -p 3002 --turbo", - "build:async": "dotenv -e ../../.env -e ../../.env.local -- next build", + "build:apps": "dotenv -e ../../.env -e ../../.env.local -- next build", "start": "dotenv -e ../../.env -e ../../.env.local -- next start -p 3002", "lint": "eslint .", "lint-timing": "TIMING=1 eslint ." diff --git a/package.json b/package.json index 85d0e6a70..31c89e0c0 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "prebuild": "turbo run prebuild --cache-dir=.turbo", "build": "turbo run build --cache-dir=.turbo", "build-rays-frontend": "turbo run build --cache-dir=.turbo --filter=@summerfi/rays-dashboard", - "build-earn-frontend": "turbo run build --cache-dir=.turbo --filter=@summerfi/earn-protocol", - "build-earn-frontend-landing": "turbo run build --cache-dir=.turbo --filter=@summerfi/earn-protocol-landing-page", + "build-earn-frontend": "turbo run build:apps --cache-dir=.turbo --filter=@summerfi/earn-protocol", + "build-earn-frontend-landing": "turbo run build:apps --cache-dir=.turbo --filter=@summerfi/earn-protocol-landing-page", "prebuild:sdk": "turbo run prebuild --cache-dir=.turbo --filter=./packages/* --filter=./sdk/*", "build:sdk": "turbo run build --cache-dir=.turbo --filter=./packages/* --filter=./sdk/*", "lint": "turbo run lint --cache-dir=.turbo", diff --git a/turbo.json b/turbo.json index 38f2e8929..166d154cc 100644 --- a/turbo.json +++ b/turbo.json @@ -101,6 +101,17 @@ ".sst/**" ] }, + "build:apps": { + "dependsOn": ["prebuild", "^build", "^build:apps"], + "outputs": [ + ".next/**", + ".next/server/pages/**", + "!.next/cache/**", + "dist/**", + "artifacts/**", + ".sst/**" + ] + }, "test": { "dependsOn": ["prebuild", "build", "^test"] },