From b4cd15454b07135f540f79e5d7148aca549b4f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20L=C3=B3pez?= Date: Mon, 10 Jun 2024 14:48:28 +0200 Subject: [PATCH] Lighthouse ddev new folder schema --- commands/lighthouse/lighthouse | 11 ++++++----- docker-compose.lighthouse.yaml | 2 +- install.yaml | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/commands/lighthouse/lighthouse b/commands/lighthouse/lighthouse index 9fc0027..bab3791 100644 --- a/commands/lighthouse/lighthouse +++ b/commands/lighthouse/lighthouse @@ -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/ \ No newline at end of file +lhci autorun --config=./config/$FOLDER/$FILE --collect.outputDir=./export +ls -l ./export/ \ No newline at end of file diff --git a/docker-compose.lighthouse.yaml b/docker-compose.lighthouse.yaml index 491b39d..9a48ce1 100644 --- a/docker-compose.lighthouse.yaml +++ b/docker-compose.lighthouse.yaml @@ -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: diff --git a/install.yaml b/install.yaml index 77a9524..e780087 100644 --- a/install.yaml +++ b/install.yaml @@ -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."