Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
vadim committed Dec 18, 2024
1 parent 585536f commit 1173d66
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 31 deletions.
59 changes: 29 additions & 30 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,36 @@ jobs:
- name: Run Mypy
uses: jashparekh/mypy-action@v2
with:
path: "app"
mypy_version: "0.910"
requirement_files: "app/requirements.txt"
python_version: "3.12"

# Tests:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Run Docker Compose
# run: docker compose -f docker-compose.yaml up -d
# - name: Check Docker container
# run: sleep 3
# -
# run: docker ps -a
# -
# run: docker compose logs
# - name: Test Docker Start
# run: curl http://127.0.0.1:8000
# -
# run: curl http://localhost:8000/unique_notes
# - uses: actions/setup-python@v2
# with:
# python-version: '3.12'
# architecture: 'x64'
# - name: Install requirements
# run: pip install -r requirements.txt
# - name: Run tests
# run: coverage run -m pytest tests/test_application.py
# - name: Tests report
# run: coverage report
Tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Run Docker Compose
run: docker compose -f docker-compose.yaml up -d
- name: Check Docker container
run: sleep 3
-
run: docker ps -a
-
run: docker compose logs
- name: Test Docker Start
run: curl http://127.0.0.1:8000
-
run: curl http://localhost:8000/unique_notes
- uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: 'x64'
- name: Install requirements
run: pip install -r requirements.txt
- name: Run tests
run: coverage run -m pytest tests/test_application.py
- name: Tests report
run: coverage report
4 changes: 3 additions & 1 deletion app/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import typing

from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
from sqlalchemy.dialects.postgresql import ARRAY, JSON
from sqlalchemy.orm import DeclarativeBase, relationship
Expand All @@ -13,7 +15,7 @@ class Coffee(Base):
title = Column(String(200), nullable=False)
origin = Column(String(200))
intensifier = Column(String(100))
notes = Column(ARRAY(String(100)))
notes : Column[list[str]] = Column(ARRAY(String))

def __repr__(self):
return f"Coffee(id={self.id}),title={self.title}, origin={self.origin}, intensifier={self.intensifier}, notes={self.notes}"
Expand Down

0 comments on commit 1173d66

Please sign in to comment.