Skip to content

Commit

Permalink
Lighthouse ddev new folder schema
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjol committed Jun 10, 2024
1 parent 84594a5 commit b4cd154
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions commands/lighthouse/lighthouse
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
## ExecRaw: true
# export NODE_TLS_REJECT_UNAUTHORIZED='0'

CONFIG_FILE=${1:-'lighthouserc.js'}
FOLDER=${1:-'local'}
FILE=${2:-'lighthouserc.json'}

if [ ! -f ./config/$CONFIG_FILE ]; then
echo "Config file ./config/$CONFIG_FILE not found"
if [ ! -f ./config/$FOLDER/$FILE ]; then
echo "Config file ./config/$FOLDER/$FILE not found"
exit 1
fi

lhci autorun --config=./config/$CONFIG_FILE --collect.outputDir=~/export
ls -l ~/export/
lhci autorun --config=./config/$FOLDER/$FILE --collect.outputDir=./export
ls -l ./export/
2 changes: 1 addition & 1 deletion docker-compose.lighthouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
user: '$DDEV_UID:$DDEV_GID'
networks: [default, ddev_default]
restart: "no"
shm_size: 1gb
shm_size: ${LIGHTHOUSE_SHM_SIZE:-1gb}
cap_add:
- SYS_ADMIN
labels:
Expand Down
6 changes: 3 additions & 3 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ project_files:
- lighthouseBuild/

post_install_actions:
- test -d ${DDEV_APPROOT}/tests/lighthouse || mkdir -p ${DDEV_APPROOT}/tests/lighthouse
- test -d ${DDEV_APPROOT}/tests/lighthouse/local || mkdir -p ${DDEV_APPROOT}/tests/lighthouse/local
- test -d ${DDEV_APPROOT}/reports/lighthouse || mkdir -p ${DDEV_APPROOT}/reports/lighthouse
- test -f "${DDEV_APPROOT}/tests/lighthouse/lighthouserc.js" || cp lighthouse/lighthouserc.js.example ${DDEV_APPROOT}/tests/lighthouse/lighthouserc.js
- test -f "${DDEV_APPROOT}/tests/lighthouse/local/lighthouserc.js" || cp lighthouse/local/lighthouserc.js.example ${DDEV_APPROOT}/tests/lighthouse/local/lighthouserc.js

- echo "Install finished. Please adjust tests in ${DDEV_APPROOT}/tests/functional/lighthouse/lighthouserc.js."
- echo "Install finished. Please adjust tests in ${DDEV_APPROOT}/tests/lighthouse/local/lighthouserc.js."

0 comments on commit b4cd154

Please sign in to comment.