Fix workflow syntax
All checks were successful
Test FastAPI Startup / fastapi-up (push) Successful in 55s
All checks were successful
Test FastAPI Startup / fastapi-up (push) Successful in 55s
This commit is contained in:
@@ -1,34 +1,30 @@
|
||||
name: Test FastAPI Startup
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: *
|
||||
pull_request:
|
||||
branches: *
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
fastapi-up:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
fastapi-up:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install uvicorn
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install uvicorn
|
||||
|
||||
- name: Check FastAPI startup
|
||||
run: |
|
||||
uvicorn main:app --host 127.0.0.1 --port 8000 &
|
||||
sleep 5
|
||||
curl --fail http://127.0.0.1:8000/ || (echo 'FastAPI did not start!' && exit 1)
|
||||
env:
|
||||
SECRET_KEY: test_secret
|
||||
DATABASE_FILE: test.db
|
||||
- name: Check FastAPI startup
|
||||
run: |
|
||||
uvicorn main:app --host 127.0.0.1 --port 8000 &
|
||||
sleep 5
|
||||
curl --fail http://127.0.0.1:8000/ || (echo 'FastAPI did not start!' && exit 1)
|
||||
env:
|
||||
SECRET_KEY: test_secret
|
||||
DATABASE_FILE: test.db
|
||||
|
||||
Reference in New Issue
Block a user