From 37a7e99e78d1216853561fd63268cdbb0c7b03fc Mon Sep 17 00:00:00 2001 From: Firq Date: Tue, 22 Oct 2024 17:54:37 +0200 Subject: [PATCH] healthcheck + logs --- .forgejo/workflows/unlighthouse.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/unlighthouse.yml b/.forgejo/workflows/unlighthouse.yml index 729cb26..b0648d2 100644 --- a/.forgejo/workflows/unlighthouse.yml +++ b/.forgejo/workflows/unlighthouse.yml @@ -10,8 +10,11 @@ jobs: services: website: image: forgejo.neshweb.net/firq/firq-dev-website:preview - ports: - - 8081:8081 + options: >- + --health-cmd "curl -sS http://website/ || echo exit 1" + --health-interval 10s + --health-timeout 5s + --health-retries 5 steps: - name: Checkout repository uses: https://code.forgejo.org/actions/checkout@v3 @@ -21,8 +24,10 @@ jobs: run: curl -v -o - "http://website:8081/" || true - name: test run: curl -v -o - "http://website/" || true + - name: logs + run: docker logs "${{ job.services.website.id }}" - name: Run unlighthouse - run: unlighthouse-ci --site "http://website:8081/" --disable-dynamic-sampling + run: unlighthouse-ci --site "http://website/" --disable-dynamic-sampling - name: Prepare artifacts run: cp serve.json unlighthouse-reports - name: Upload reports