Skip to content

Commit 89fc46f

Browse files
committed
fix: honor npm workspaces
1 parent 0b2f080 commit 89fc46f

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

.github/scripts/changed-modules.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ while IFS= read -r file; do
5656
done < <(find "${ROOT_DIR}" -maxdepth 1 -type f -not -name "package.json" -not -name "package-lock.json")
5757

5858
# define an array of modules that won't be part of the build
59-
readonly no_build_modules=("packages/modules/k6")
59+
readonly no_build_modules=()
6060

6161
# modules is an array that will store the paths of all the modules in the repository.
6262
modules=()
@@ -67,11 +67,7 @@ modules=()
6767
for packageJSONFile in $(find "${ROOT_DIR}" -name "package.json" -not -path "*/node_modules/*"); do
6868
name=$(basename "$(dirname "${packageJSONFile}")")
6969
if [[ "${name}" != "testcontainers-node" ]]; then
70-
if [[ "${name}" != "testcontainers" ]]; then
71-
modules+=("\"packages/modules/${name}\"")
72-
else
73-
modules+=("\"packages/testcontainers\"")
74-
fi
70+
modules+=("\"${name}\"")
7571
fi
7672
done
7773
# sort modules array
@@ -107,7 +103,7 @@ for file in $modified_files; do
107103
if [[ $file == packages/modules/* ]]; then
108104
module_name=$(echo $file | cut -d'/' -f3)
109105
if [[ ! " ${modified_modules[@]} " =~ " ${module_name} " ]]; then
110-
modified_modules+=("\"packages/modules/$module_name\"")
106+
modified_modules+=("\"$module_name\"")
111107
fi
112108
else
113109
# a file from the core module (packages/testcontainers) is modified, so include all modules in the list and stop the loop

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ jobs:
6666
node-version: 22.x
6767
workspace: "${{ matrix.module }}"
6868
- name: Code linting
69-
working-directory: ${{ matrix.module }}
7069
run: npm run lint:ci -- ${{ matrix.module }}
7170

7271
smoke-test:

0 commit comments

Comments
 (0)