Compare commits
1 Commits
150bca647e
...
c392f05887
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c392f05887 |
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
@@ -83,9 +83,10 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check npm install ran
|
# Check npm install result (node_modules required only if production deps exist)
|
||||||
if [ ! -d "./modules/simple-module/node_modules" ]; then
|
DEP_COUNT=$(node -e 'const p=require("./modules/simple-module/package.json"); const c=Object.keys(p.dependencies||{}).length+Object.keys(p.optionalDependencies||{}).length; console.log(c);')
|
||||||
echo "::error::node_modules not found - npm install didn't run"
|
if [ "$DEP_COUNT" -gt 0 ] && [ ! -d "./modules/simple-module/node_modules" ]; then
|
||||||
|
echo "::error::node_modules not found for module with production dependencies"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -388,9 +389,10 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check node_modules directory created
|
# Check npm install result (node_modules required only if production deps exist)
|
||||||
if [ ! -d "./modules/vue-module/node_modules" ]; then
|
DEP_COUNT=$(node -e 'const p=require("./modules/vue-module/package.json"); const c=Object.keys(p.dependencies||{}).length+Object.keys(p.optionalDependencies||{}).length; console.log(c);')
|
||||||
echo "::error::node_modules directory not found - npm install failed"
|
if [ "$DEP_COUNT" -gt 0 ] && [ ! -d "./modules/vue-module/node_modules" ]; then
|
||||||
|
echo "::error::node_modules directory not found for module with production dependencies"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -475,9 +477,10 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify Node module
|
# Verify Node module (node_modules required only if production deps exist)
|
||||||
if [ ! -d "./modules/frontend/node_modules" ]; then
|
DEP_COUNT=$(node -e 'const p=require("./modules/frontend/package.json"); const c=Object.keys(p.dependencies||{}).length+Object.keys(p.optionalDependencies||{}).length; console.log(c);')
|
||||||
echo "::error::Frontend npm dependencies not installed"
|
if [ "$DEP_COUNT" -gt 0 ] && [ ! -d "./modules/frontend/node_modules" ]; then
|
||||||
|
echo "::error::Frontend module has production dependencies but node_modules is missing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user