[Patch] Router 버그 핸들링 #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Server Unit Test | |
on: | |
pull_request: | |
branches: dev-server | |
env: | |
SNEK_POSTGRES_DB: postgres | |
SNEK_POSTGRES_USER: postgres | |
SNEK_POSTGRES_PW: postgres | |
SNEK_POSTGRES_HOST: localhost | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_DB: ${{ env.SNEK_POSTGRES_DB }} | |
POSTGRES_USER: ${{ env.SNEK_POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.SNEK_POSTGRES_PW }} | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
# Setup Stage | |
- name: "[Setup] Checkout" | |
uses: actions/checkout@v3 | |
- name: "[Setup] Check Python Version" | |
run: python --version | |
- name: "[Setup] Python dependencies" | |
run: pip install -r fastapi/requirements.txt | |
# Test Stage | |
- name: "[Test] Unit Test" | |
run: | | |
cd fastapi | |
for entry in tests/*.py | |
do | |
python -m unittest --verbose ${entry} | |
done |