Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name : Test Pipeline

on:
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

env:
DATABASE_URL: sqlite:///./test.db
GOOGLE_CLIENT_ID: dummy-client-id
ENV: test

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11.x'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Lint
run: |
pip install ruff
ruff check .

- name: Run tests
run: PYTHONPATH=. pytest -v
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ starlette==0.50.0
typing-inspection==0.4.2
typing_extensions==4.15.0
uvicorn==0.40.0
ruff
pytest
Empty file added tests/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions tests/test_import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
def test_app_import():
from app.main import app
assert app is not None
Loading