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
|
||||
fi
|
||||
|
||||
# Check npm install ran
|
||||
if [ ! -d "./modules/simple-module/node_modules" ]; then
|
||||
echo "::error::node_modules not found - npm install didn't run"
|
||||
# Check npm install result (node_modules required only if production deps exist)
|
||||
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);')
|
||||
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
|
||||
fi
|
||||
|
||||
@@ -388,9 +389,10 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check node_modules directory created
|
||||
if [ ! -d "./modules/vue-module/node_modules" ]; then
|
||||
echo "::error::node_modules directory not found - npm install failed"
|
||||
# Check npm install result (node_modules required only if production deps exist)
|
||||
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);')
|
||||
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
|
||||
fi
|
||||
|
||||
@@ -475,9 +477,10 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify Node module
|
||||
if [ ! -d "./modules/frontend/node_modules" ]; then
|
||||
echo "::error::Frontend npm dependencies not installed"
|
||||
# Verify Node module (node_modules required only if production deps exist)
|
||||
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);')
|
||||
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
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user