From f2cba464c8c3b75a644ed92330da55b81fee4fe4 Mon Sep 17 00:00:00 2001 From: swee Date: Sun, 19 Jan 2025 12:06:30 -0800 Subject: [PATCH] Update .forgejo/workflows/test.yml --- .forgejo/workflows/test.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 46fe4ab..2366d04 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -24,7 +24,7 @@ jobs: if: always() run: cat log.log hypercorn: - name: Test server with Hypercorn + name: Test server with Hypercorn (ASGI) runs-on: docker steps: - uses: actions/checkout@v4 @@ -42,6 +42,26 @@ jobs: - name: Kill server if: always() run: pkill hypercorn + - name: Show logs + if: always() + run: cat log.log + gunicorn: + name: Test server with Gunicorn (WSGI) + runs-on: docker + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install dependencies + run: apt update && apt install python3-pip curl wget -y && pip install --break-system-packages flask gunicorn pyOpenSSL + - name: Run server + run: gunicorn -w 2 -b 127.0.0.1:1234 'server:app' > log.log & + - name: Test server homepage + run: curl 127.0.0.1:1234 + + + - name: Kill server + if: always() + run: pkill gunicorn - name: Show logs if: always() run: cat log.log \ No newline at end of file