lighthouse
This commit is contained in:
@@ -139,6 +139,7 @@ jobs:
|
||||
docker logs $container_id || true
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
#- name: Wait for Live Server
|
||||
# run: |
|
||||
# attempts=0
|
||||
@@ -184,18 +185,15 @@ jobs:
|
||||
- name: Lighthouse Analysis
|
||||
run: |
|
||||
yarn add lighthouse
|
||||
npx lighthouse http://live-server:80 --output json --output-path /tmp/lighthouse-report.json --chrome-flags="--headless --no-sandbox --disable-dev-shm-usage"
|
||||
npx lighthouse http://live-server:80 --output json --output-path /tmp/lighthouse-report.json --chrome-flags="--headless --no-sandbox --disable-dev-shm-usage"
|
||||
|
||||
# Notify-Lighthouse Step
|
||||
- name: Notify Lighthouse
|
||||
- name: upload-to-nextcloud
|
||||
run: |
|
||||
docker run --rm \
|
||||
-e PLUGIN_FROM=noreply@gitbase.de \
|
||||
-e PLUGIN_HOST=smtp.basehosts.de \
|
||||
-e PLUGIN_RECIPIENT=binkrassdufass@gmail.com \
|
||||
-e PLUGIN_SUBJECT="Lighthouse Report" \
|
||||
-v ${{ github.workspace }}/tmp:/lighthouse-reports \
|
||||
drillster/drone-email /tmp/lighthouse-report.json
|
||||
sudo apt-get update && sudo apt-get install -y curl bash findutils
|
||||
export datetime=`date +%Y-%m-%d_%H-%M-%S`
|
||||
mkdir -p /tmp/cloudsend/${GITHUB_REF_NAME}/$${datetime}
|
||||
mv /tmp/lighthouse-report.json /tmp/cloudsend/${GITHUB_REF_NAME}/$${datetime}/
|
||||
./scripts/cloudsend.sh /tmp/cloudsend/ https://www.basiswolke.de/index.php/s/xHGsypbqiifnGH5
|
||||
|
||||
deploy:
|
||||
name: deploy
|
||||
@@ -242,24 +240,6 @@ jobs:
|
||||
- name: setup node 18
|
||||
uses: actions/setup-node@v3
|
||||
|
||||
- name: container within a step
|
||||
uses: docker://node:20-alpine3.19
|
||||
with:
|
||||
entrypoint: echo
|
||||
args: "dastest"
|
||||
- name: check docker networking infos
|
||||
run: |
|
||||
echo "${{ toJson(job) }}"
|
||||
echo "${{ github }}"
|
||||
docker network ls
|
||||
docker network inspect bridge
|
||||
docker network inspect host
|
||||
docker network inspect none
|
||||
docker network inspect container:${{ job.services.tibi-server.id }}
|
||||
docker network inspect container:${{ job.services.live-server.id }}
|
||||
docker network inspect container:${{ job.services.mongo.id }}
|
||||
docker network inspect container:${{ job.services.maildev.id }}
|
||||
|
||||
- name: install dependencies
|
||||
env:
|
||||
FORCE_COLOR: "true"
|
||||
@@ -310,58 +290,6 @@ jobs:
|
||||
run: |
|
||||
yarn build:legacy
|
||||
|
||||
- name: Wait for Live Server
|
||||
run: |
|
||||
attempts=0
|
||||
max_attempts=2
|
||||
while ! curl --output /dev/null --silent --head --fail http://live-server:8081; do
|
||||
if [ $attempts -eq $max_attempts ]; then
|
||||
echo "Live server not ready after $max_attempts attempts"
|
||||
echo "${{ toJson(job) }}"
|
||||
curl -v http://live-server:8081
|
||||
exit 1
|
||||
fi
|
||||
attempts=$((attempts+1))
|
||||
echo "Waiting for live-server to be ready... attempt $attempts"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
- name: Test HTTP Request
|
||||
run: |
|
||||
echo "Live server not ready after $max_attempts attempts"
|
||||
echo "${{ toJson(job) }}"
|
||||
echo "${{ job.services.live-server.id }}"
|
||||
echo "${{ job.services.tibi-server.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
|
||||
|
||||
- name: Install Chrome
|
||||
run: |
|
||||
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'
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y google-chrome-stable
|
||||
|
||||
# Lighthouse Analysis Step
|
||||
- name: Lighthouse Analysis
|
||||
run: |
|
||||
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"
|
||||
|
||||
# Notify-Lighthouse Step
|
||||
- name: Notify Lighthouse
|
||||
run: |
|
||||
docker run --rm \
|
||||
-e PLUGIN_FROM=noreply@gitbase.de \
|
||||
-e PLUGIN_HOST=smtp.basehosts.de \
|
||||
-e PLUGIN_RECIPIENT=recipient@example.com \
|
||||
-e PLUGIN_SUBJECT="Lighthouse Report" \
|
||||
-v ${{ github.workspace }}/tmp:/lighthouse-reports \
|
||||
drillster/drone-email /tmp/lighthouse-report.json
|
||||
|
||||
- name: deploy
|
||||
if: github.ref == 'refs/heads/master'
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user