lghthouse
This commit is contained in:
parent
ffeba5b404
commit
366dfeec5c
@ -100,59 +100,60 @@ jobs:
|
|||||||
FORCE_COLOR: "true"
|
FORCE_COLOR: "true"
|
||||||
run: |
|
run: |
|
||||||
yarn build:legacy
|
yarn build:legacy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#- name: Wait for Live Server
|
- name: Wait for Live Server
|
||||||
# run: |
|
run: |
|
||||||
# attempts=0
|
attempts=0
|
||||||
# max_attempts=2
|
max_attempts=2
|
||||||
# while ! curl --output /dev/null --silent --head --fail http://live-server:8081; do
|
while ! curl --output /dev/null --silent --head --fail http://live-server:8081; do
|
||||||
# if [ $attempts -eq $max_attempts ]; then
|
if [ $attempts -eq $max_attempts ]; then
|
||||||
# echo "Live server not ready after $max_attempts attempts"
|
echo "Live server not ready after $max_attempts attempts"
|
||||||
# echo "${{ toJson(job) }}"
|
echo "${{ toJson(job) }}"
|
||||||
# curl -v http://live-server:8081
|
curl -v http://live-server:8081
|
||||||
# exit 1
|
exit 1
|
||||||
# fi
|
fi
|
||||||
# attempts=$((attempts+1))
|
attempts=$((attempts+1))
|
||||||
# echo "Waiting for live-server to be ready... attempt $attempts"
|
echo "Waiting for live-server to be ready... attempt $attempts"
|
||||||
# sleep 5
|
sleep 5
|
||||||
# done
|
done
|
||||||
|
|
||||||
#- name: Test HTTP Request
|
- name: Test HTTP Request
|
||||||
# run: |
|
run: |
|
||||||
# echo "Live server not ready after $max_attempts attempts"
|
echo "Live server not ready after $max_attempts attempts"
|
||||||
# echo "${{ toJson(job) }}"
|
echo "${{ toJson(job) }}"
|
||||||
# echo "${{ job.services.live-server.id }}"
|
echo "${{ job.services.live-server.id }}"
|
||||||
# echo "${{ job.services.tibi-server.id }}"
|
echo "${{ job.services.tibi-server.id }}"
|
||||||
## echo "${{ job.services.mongo.id }}"
|
echo "${{ job.services.mongo.id }}"
|
||||||
|
docker logs "${{ job.services.tibi-server.id }}"
|
||||||
|
docker logs "${{ job.services.live-server.id }}"
|
||||||
|
curl -v http://live-server:8081
|
||||||
|
|
||||||
# docker logs "${{ job.services.tibi-server.id }}"
|
- name: Install Chrome
|
||||||
# docker logs "${{ job.services.live-server.id }}"
|
run: |
|
||||||
# curl -v http://live-server:8081
|
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
||||||
|
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
|
||||||
#- name: Install Chrome
|
|
||||||
# run: |
|
sudo apt-get update
|
||||||
# wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
sudo apt-get install -y google-chrome-stable
|
||||||
# sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
|
|
||||||
#
|
|
||||||
# sudo apt-get update
|
|
||||||
# sudo apt-get install -y google-chrome-stable
|
|
||||||
|
|
||||||
# Lighthouse Analysis Step
|
# Lighthouse Analysis Step
|
||||||
#- name: Lighthouse Analysis
|
name: Lighthouse Analysis
|
||||||
# run: |
|
run: |
|
||||||
# yarn add lighthouse
|
yarn add lighthouse
|
||||||
# npx lighthouse http://127.0.0.1:8081 --output json --output-path /tmp/lighthouse-report.json --chrome-flags="--headless --no-sandbox --disable-dev-shm-usage"
|
npx lighthouse http://127.0.0.1:8081 --output json --output-path /tmp/lighthouse-report.json --chrome-flags="--headless --no-sandbox --disable-dev-shm-usage"
|
||||||
|
|
||||||
# Notify-Lighthouse Step
|
# Notify-Lighthouse Step
|
||||||
#- name: Notify Lighthouse
|
- name: Notify Lighthouse
|
||||||
# run: |
|
run: |
|
||||||
# docker run --rm \
|
docker run --rm \
|
||||||
# -e PLUGIN_FROM=noreply@gitbase.de \
|
-e PLUGIN_FROM=noreply@gitbase.de \
|
||||||
# -e PLUGIN_HOST=smtp.basehosts.de \
|
-e PLUGIN_HOST=smtp.basehosts.de \
|
||||||
# -e PLUGIN_RECIPIENT=recipient@example.com \
|
-e PLUGIN_RECIPIENT=recipient@example.com \
|
||||||
# -e PLUGIN_SUBJECT="Lighthouse Report" \
|
-e PLUGIN_SUBJECT="Lighthouse Report" \
|
||||||
# -v ${{ github.workspace }}/tmp:/lighthouse-reports \
|
-v ${{ github.workspace }}/tmp:/lighthouse-reports \
|
||||||
# drillster/drone-email /tmp/lighthouse-report.json
|
drillster/drone-email /tmp/lighthouse-report.json
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
@ -161,3 +162,4 @@ jobs:
|
|||||||
RSYNC_PASS: ${{ secrets.rsync_master }}
|
RSYNC_PASS: ${{ secrets.rsync_master }}
|
||||||
run: |
|
run: |
|
||||||
scripts/deploy.sh ftp1.webmakers.de $RSYNC_USER $RSYNC_PASS
|
scripts/deploy.sh ftp1.webmakers.de $RSYNC_USER $RSYNC_PASS
|
||||||
|
#cypress
|
Loading…
Reference in New Issue
Block a user