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:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue