From 0a9177a3a16909bba500205a313950faed2c3164 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Tue, 28 May 2024 12:28:16 +0200
Subject: [PATCH] OZG-5271 OZG-5782 Use nx affected

Instead of `run-many` according to https://nx.dev/nx-api/jest/documents/overview#performance-in-ci
Also no colored output.
---
 alfa-client/package.json | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/alfa-client/package.json b/alfa-client/package.json
index c107e0817a..6887af44ed 100644
--- a/alfa-client/package.json
+++ b/alfa-client/package.json
@@ -10,7 +10,7 @@
     "start-for-screenreader": "nx run alfa:serve --host 192.168.178.20 --port 4300 --disable-host-check --verbose",
     "start:devbe": "nx run alfa:serve --port 4300 --disable-host-check --proxy-config proxy.dev.conf.json --verbose",
     "build": "nx run alfa:build",
-    "test": "nx run-many --target=test --parallel 8 -- --runInBand",
+    "test": "nx affected --target=test --parallel 8 -- --runInBand",
     "test:cov": "jest --coverage",
     "test:lib": "nx test ${npm_config_lib} --watchAll",
     "test:debug:lib": "nx test ${npm_config_lib} --detectOpenHandles --watchAll",
@@ -18,8 +18,8 @@
     "ci-build-admin": "nx container admin && cp -r dist/ apps/admin/",
     "ci-prodBuild": "nx run alfa:build --outputHashing=all --configuration production",
     "ci-prodBuild-admin": "nx container admin && cp -r dist/ apps/admin/",
-    "ci-test": "nx run-many --target=test --parallel 8 -- --runInBand",
-    "ci-sonar": "nx run-many --target=test --parallel 8 -- --runInBand --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && npx sonar-scanner",
+    "ci-test": "nx affected --target=test --parallel 12 -- --runInBand --color=false",
+    "ci-sonar": "nx affected --target=test --parallel 12 -- --runInBand --color=false --codeCoverage --coverageReporters=lcov --testResultsProcessor=jest-sonar-reporter && npx sonar-scanner",
     "lint": "nx workspace-lint && nx lint",
     "affected:apps": "nx affected:apps",
     "affected:libs": "nx affected:libs",
@@ -159,4 +159,4 @@
     "ts-node": "10.9.1",
     "typescript": "5.4.5"
   }
-}
+}
\ No newline at end of file
-- 
GitLab