Modified for network
This commit is contained in:
parent
f3ff40b6f1
commit
974f259804
1 changed files with 11 additions and 9 deletions
|
@ -11,38 +11,40 @@ jobs:
|
||||||
website:
|
website:
|
||||||
image: forgejo.neshweb.net/firq/firq-dev-website:preview
|
image: forgejo.neshweb.net/firq/firq-dev-website:preview
|
||||||
options: >-
|
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-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
--workdir /app
|
--workdir /app
|
||||||
ports:
|
ports:
|
||||||
- 8081:8081
|
- 26400:8081
|
||||||
steps:
|
steps:
|
||||||
- name: Wait for service to be healthy
|
- name: Wait for service to be healthy
|
||||||
run: |
|
run: |
|
||||||
for i in {1..10}; do
|
for i in {1..10}; do
|
||||||
if curl -f http://localhost:8081/; then
|
STATUS=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:26400/)
|
||||||
echo "Website is up!"
|
if [ "$STATUS" -eq 200 ]; then
|
||||||
|
echo "Website is up with status 200!"
|
||||||
break
|
break
|
||||||
|
else
|
||||||
|
echo "Website not ready yet, status: $STATUS"
|
||||||
fi
|
fi
|
||||||
echo "Waiting for website to be up..."
|
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: https://code.forgejo.org/actions/checkout@v3
|
uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
- name: test
|
- name: test
|
||||||
run: curl -v -o - "http://localhost:8081/" || true
|
run: curl -v -o - "http://localhost:26400/" || true
|
||||||
- name: test
|
- name: test
|
||||||
run: curl -v -o - "http://website:8081/" || true
|
run: curl -v -o - "http://website:26400/" || true
|
||||||
- name: test
|
- name: test
|
||||||
run: curl -v -o - "http://website/" || true
|
run: curl -v -o - "http://website/" || true
|
||||||
- name: test
|
- name: test
|
||||||
run: curl -v -o - "website" || true
|
run: curl -v -o - "website" || true
|
||||||
- name: test
|
- name: test
|
||||||
run: curl -v -o - "website:8081" || true
|
run: curl -v -o - "website:26400" || true
|
||||||
- name: Run unlighthouse
|
- 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
|
- name: Prepare artifacts
|
||||||
run: cp serve.json unlighthouse-reports
|
run: cp serve.json unlighthouse-reports
|
||||||
- name: Upload reports
|
- name: Upload reports
|
||||||
|
|
Loading…
Reference in a new issue