diff --git a/client/turbo.json b/client/turbo.json index 62132b93e5b..a2f8ca5117d 100644 --- a/client/turbo.json +++ b/client/turbo.json @@ -3,9 +3,14 @@ "extends": ["//"], "tasks": { "build": { + "env": ["FCC_*"], "outputs": ["public/**"] }, + "develop": { + "env": ["FCC_*"] + }, "setup": { + "env": ["FCC_*"], "outputs": [ "config/env.json", "i18n/locales/*.json", diff --git a/curriculum/package.json b/curriculum/package.json index c782bd32693..821676b7026 100644 --- a/curriculum/package.json +++ b/curriculum/package.json @@ -50,7 +50,7 @@ "test:watch": "pnpm test-gen && vitest", "test-gen": "tsx ./src/test/utils/generate-block-tests.ts", "test-tooling": "pnpm test --project @freecodecamp/curriculum", - "test-content": "pnpm test --project test" + "test-content": "pnpm test-gen && pnpm test --project test" }, "devDependencies": { "@babel/core": "7.23.7", diff --git a/curriculum/turbo.json b/curriculum/turbo.json index ed5ebccd8d1..355b79c3d3c 100644 --- a/curriculum/turbo.json +++ b/curriculum/turbo.json @@ -3,7 +3,14 @@ "extends": ["//"], "tasks": { "build": { - "outputs": ["dist/**", "generated/**"] + "outputs": ["dist/**", "generated/**"], + "env": ["FCC_*"] + }, + "test": { + "env": ["FCC_*"] + }, + "test-content": { + "env": ["FCC_*"] } } } diff --git a/package.json b/package.json index 52eb45d67bd..cd68e21dc73 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,9 @@ "serve:client-ci": "cd ./client && pnpm run serve-ci", "start": "turbo setup && npm-run-all -p develop:server serve:client", "test": "turbo test", + "test-client": "turbo -F=@freecodecamp/client test", + "test-api": "turbo -F=@freecodecamp/api test", + "test-curriculum-content": "turbo -F=@freecodecamp/curriculum test-content", "prepare": "husky", "playwright:run": "pnpm -F e2e run playwright:run", "playwright:watch": "pnpm -F e2e run playwright:watch" diff --git a/tools/scripts/test_challenges.sh b/tools/scripts/test_challenges.sh index e31d6a44dff..6efa4432011 100755 --- a/tools/scripts/test_challenges.sh +++ b/tools/scripts/test_challenges.sh @@ -10,5 +10,5 @@ IFS=',' challengeIDS=($input) for challengeID in "${challengeIDS[@]}"; do challengeID="$(tr -d ' ' <<< "$challengeID")" - FCC_CHALLENGE_ID=$challengeID pnpm run test:curriculum + FCC_CHALLENGE_ID=$challengeID pnpm turbo -F=@freecodecamp/curriculum test done diff --git a/turbo.json b/turbo.json index 21c60aff6df..6e5d83f61f5 100644 --- a/turbo.json +++ b/turbo.json @@ -6,6 +6,7 @@ "lint": { "dependsOn": ["setup"] }, "setup": { "dependsOn": ["^build"] }, "test": { "dependsOn": ["setup"] }, + "test-content": { "dependsOn": ["setup"] }, "type-check": { "dependsOn": ["setup"] }, "//#lint-root": { "dependsOn": ["@freecodecamp/shared#build"]