Skip to content

Commit

Permalink
Updated tests folders
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjol committed Jun 7, 2024
1 parent 95933f9 commit 84594a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 10 additions & 3 deletions commands/lighthouse/lighthouse
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
## Example: "ddev lighthouse"
## ExecRaw: true
# export NODE_TLS_REJECT_UNAUTHORIZED='0'
lhci autorun --collect.outputDir=~/export || true
tar -cf - *.json *.html | tar -xvf - -C export/
ls -l export/

CONFIG_FILE=${1:-'lighthouserc.js'}

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

lhci autorun --config=./config/$CONFIG_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 @@ -25,6 +25,6 @@ services:
NODE_EXTRA_CA_CERTS: /mnt/ddev-global-cache/mkcert/rootCA.pem
volumes:
- ../reports/lighthouse:/home/$USER/reports/export
- ../tests/functional/lighthouse/lighthouserc.js:/home/$USER/reports/lighthouserc.js
- ../tests/lighthouse:/home/$USER/reports/config
- .:/mnt/ddev_config:ro
- ddev-global-cache:/mnt/ddev-global-cache
4 changes: 2 additions & 2 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/functional/lighthouse || mkdir -p ${DDEV_APPROOT}/tests/functional/lighthouse
- test -d ${DDEV_APPROOT}/tests/lighthouse || mkdir -p ${DDEV_APPROOT}/tests/lighthouse
- test -d ${DDEV_APPROOT}/reports/lighthouse || mkdir -p ${DDEV_APPROOT}/reports/lighthouse
- test -f "${DDEV_APPROOT}/tests/functional/lighthouse/lighthouserc.js" || cp lighthouse/lighthouserc.js.example ${DDEV_APPROOT}/tests/functional/lighthouse/lighthouserc.js
- test -f "${DDEV_APPROOT}/tests/lighthouse/lighthouserc.js" || cp lighthouse/lighthouserc.js.example ${DDEV_APPROOT}/tests/lighthouse/lighthouserc.js

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

0 comments on commit 84594a5

Please sign in to comment.