Skip to content

Commit

Permalink
clean up lighthouse script
Browse files Browse the repository at this point in the history
  • Loading branch information
zdeveloper committed Jul 5, 2023
1 parent 9c53aed commit 2e1a8ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,10 @@ jobs:
echo "Nginx branch tag (or latest): ${{ inputs.DOCKER_NGINX_IMAGE_VERSION }}"
echo "Wiremock branch tag (or latest): ${{ inputs.DOCKER_WIREMOCK_IMAGE_VERSION }}"
echo "Frontend branch tag (or latest): ${{ inputs.DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION }}"
echo "start docker containers"
docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --quiet-pull
echo "wait for services to be up"
pwd
ls
bash lighthouse.sh
FACILITY_ID=$(docker exec db psql -qtA -v ON_ERROR_STOP=1 -p 5432 -U simple_report_migrations simple_report -c "select internal_id from simple_report.facility limit 1;")
echo "Our facility id is: $FACILITY_ID."
echo "::endgroup::"
echo "::group::Run Lighthouse locally"
npm install -g @lhci/cli@0.9.x
lhci autorun
bash lighthouse.sh
echo "::endgroup::"
- name: Archive Lighthouse results
Expand Down
12 changes: 7 additions & 5 deletions lighthouse.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#echo "start docker containers"
#docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d
echo "start docker containers"
docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d --quiet-pull

echo "Waiting for backend to start at https://localhost.simplereport.gov/api/health"
http_response=0
Expand All @@ -19,7 +19,9 @@ fi
echo 'Backend started!'
echo

#FACILITY_ID=$(docker exec db psql -qtA -v ON_ERROR_STOP=1 -p 5432 -U simple_report_migrations simple_report -c "select internal_id from simple_report.facility limit 1;")
#echo "Our facility id is: $FACILITY_ID."
FACILITY_ID=$(docker exec db psql -qtA -v ON_ERROR_STOP=1 -p 5432 -U simple_report_migrations simple_report -c "select internal_id from simple_report.facility limit 1;")
echo "Our facility id is: $FACILITY_ID."

npm install -g @lhci/cli@0.9.x
lhci autorun

#docker compose -f docker-compose.yml -f docker-compose.ci.yml up

0 comments on commit 2e1a8ee

Please sign in to comment.