From 0e10f500aacca9e1fe19eb2ba16379f4043f2b14 Mon Sep 17 00:00:00 2001 From: Chris Raible Date: Wed, 16 Oct 2024 14:12:20 -0700 Subject: [PATCH] Added target dependencies to test scripts in ghost/core (#21332) no issue - The `test:*` commands in `ghost/core` are all implicitly dependent on the TS packages in the whole monorepo being built, but we hadn't explicitly declared this dependency to NX. - Now if you run `yarn nx run ghost:test:e2e` (or any other `test:*` commands in ghost), NX will know that it needs to rebuild the TS packages, unless they are cached and haven't changed. - With this, you should be able to directly clone the repo and run `yarn nx run ghost:test:e2e` to run e2e tests, without running `yarn dev` or `yarn nx run-many -t build:ts` first. - This is especially useful for getting tests to run properly in docker --- ghost/core/package.json | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/ghost/core/package.json b/ghost/core/package.json index 96af430d4f..737d51a12e 100644 --- a/ghost/core/package.json +++ b/ghost/core/package.json @@ -285,6 +285,71 @@ "dependsOn": [ "^build:ts" ] + }, + "test": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:single": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:all": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:unit": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:integration": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:regression": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:browser": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:browser:admin": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:browser:portal": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:e2e": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:ci:e2e": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:ci:regression": { + "dependsOn": [ + "^build:ts" + ] + }, + "test:ci:integration": { + "dependsOn": [ + "^build:ts" + ] } } }