Modified for network
Some checks failed
/ get-version (push) Successful in 2s
/ astro-check (push) Successful in 13s
/ unlighthouse (push) Failing after 1s
/ deploy-unlighthouse-files (push) Has been skipped
/ deploy-unlighthouse-site (push) Has been skipped

This commit is contained in:
Firq 2024-10-22 18:19:24 +02:00
parent f3ff40b6f1
commit 974f259804
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20

View file

@ -11,38 +11,40 @@ jobs:
website:
image: forgejo.neshweb.net/firq/firq-dev-website:preview
options: >-
--health-cmd "curl -sS http://localhost:8081/ || echo exit 1"
--health-cmd "curl -sS http://localhost:26400/ || echo exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--workdir /app
ports:
- 8081:8081
- 26400:8081
steps:
- name: Wait for service to be healthy
run: |
for i in {1..10}; do
if curl -f http://localhost:8081/; then
echo "Website is up!"
STATUS=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:26400/)
if [ "$STATUS" -eq 200 ]; then
echo "Website is up with status 200!"
break
else
echo "Website not ready yet, status: $STATUS"
fi
echo "Waiting for website to be up..."
sleep 5
done
- name: Checkout repository
uses: https://code.forgejo.org/actions/checkout@v3
- name: test
run: curl -v -o - "http://localhost:8081/" || true
run: curl -v -o - "http://localhost:26400/" || true
- name: test
run: curl -v -o - "http://website:8081/" || true
run: curl -v -o - "http://website:26400/" || true
- name: test
run: curl -v -o - "http://website/" || true
- name: test
run: curl -v -o - "website" || true
- name: test
run: curl -v -o - "website:8081" || true
run: curl -v -o - "website:26400" || true
- name: Run unlighthouse
run: unlighthouse-ci --site "http://website/" --disable-dynamic-sampling
run: unlighthouse-ci --site "http://localhost:26400/" --disable-dynamic-sampling
- name: Prepare artifacts
run: cp serve.json unlighthouse-reports
- name: Upload reports