24 lines
No EOL
847 B
YAML
24 lines
No EOL
847 B
YAML
name: Test web app
|
|
on: [push,workflow_dispatch]
|
|
jobs:
|
|
check:
|
|
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 hypercorn pyOpenSSL
|
|
- name: Run server
|
|
run: hypercorn --bind=127.0.0.1:1234 server:app > log.log &
|
|
- name: Test server homepage
|
|
run: curl localhost:1234
|
|
- name: Test server relay
|
|
run: curl localhost:1234/gem?gemini=gem.swee.codes
|
|
- name: Test server certificate generation
|
|
run: wget http://localhost:1234/gencert.zip && unzip gencert.zip
|
|
- name: Kill server
|
|
if: always()
|
|
run: pkill python3
|
|
- name: Show logs
|
|
if: always()
|
|
run: cat log.log |