Update .forgejo/workflows/test.yml
All checks were successful
Test web app / Test server with Flask Dev Mode (push) Successful in 35s
Test web app / Test server with Hypercorn (push) Successful in 32s

This commit is contained in:
Nova Cat 2025-01-19 11:56:00 -08:00
parent 1e11dcd447
commit 8e05fe76dd

View file

@ -1,7 +1,30 @@
name: Test web app
on: [push,workflow_dispatch]
jobs:
check:
flask:
name: Test server with Flask Dev Mode
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 pyOpenSSL
- name: Run server
run: python3 server.py > log.log &
- name: Test server homepage
run: curl 127.0.0.1:2009
- name: Test server relay
run: curl 127.0.0.1:2009/gem?gemini=gem.swee.codes
- name: Test server certificate generation
run: wget 127.0.0.1:2009/gencert.zip && unzip gencert.zip
- name: Kill server
if: always()
run: pkill python3
- name: Show logs
if: always()
run: cat log.log
hypercorn:
name: Test server with Hypercorn
runs-on: docker
steps:
- uses: actions/checkout@v4
@ -11,11 +34,11 @@ jobs:
- name: Run server
run: hypercorn --bind=127.0.0.1:1234 server:app > log.log &
- name: Test server homepage
run: curl localhost:1234
run: curl 127.0.0.1:1234
- name: Test server relay
run: curl localhost:1234/gem?gemini=gem.swee.codes
run: curl 127.0.0.1:1234/gem?gemini=gem.swee.codes
- name: Test server certificate generation
run: wget http://localhost:1234/gencert.zip && unzip gencert.zip
run: wget http://127.0.0.1:1234/gencert.zip && unzip gencert.zip
- name: Kill server
if: always()
run: pkill hypercorn