diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0a30db1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,13 @@ +--- +name: Dundie tests +on: + - pull_request + - push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - run: ./test.sh \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index dc537e8..05b8d55 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -11,6 +11,7 @@ services: environment: DUNDIE_DB__uri: "postgresql://postgres:postgres@db:5432/${DUNDIE_DB:-dundie}" DUNDIE_DB__connect_args: "{}" + SQLALCHEMY_SILENCE_UBER_WARNING: 1 volumes: - .:/home/app/api depends_on: @@ -21,7 +22,8 @@ services: build: postgres image: dundie_postgres-13-alpine-multi-user volumes: - - $HOME/.postgres/dundie_db/data/postgresql:/var/lib/postgresql/data + # - $HOME/.postgres/dundie_db/data/postgresql:/var/lib/postgresql/data + - dundie_pg_data:/var/lib/postgresql/data ports: # ATENÇÃO: Mude para 5432: se precisar acessar via host - "5435:5432" @@ -36,7 +38,8 @@ services: ports: - "6379:6379" volumes: - - $HOME/.redis/dundie_redis/data:/data + # - $HOME/.redis/dundie_redis/data:/data + - dundie_redis_data:/data worker: build: @@ -45,6 +48,7 @@ services: environment: DUNDIE_DB__uri: "postgresql://postgres:postgres@db:5432/${DUNDIE_DB:-dundie}" DUNDIE_DB__connect_args: "{}" + SQLALCHEMY_SILENCE_UBER_WARNING: 1 volumes: - .:/home/app/api depends_on: @@ -53,3 +57,7 @@ services: stdin_open: true tty: true command: rq worker --with-scheduler --url redis://redis:6379 + +volumes: + dundie_pg_data: + dundie_redis_data: \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt index 756bf94..34d246a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,6 +4,6 @@ sdb # debugger remoto pip-tools # lock de dependencias pytest # execução de testes pytest-order # ordenação de testes -httpx # requests async para testes +httpx==0.26.0 # requests async para testes black # auto formatação flake8 # linter diff --git a/requirements.in b/requirements.in index 32123db..4a01233 100644 --- a/requirements.in +++ b/requirements.in @@ -1,3 +1,5 @@ +pydantic<2.0 # Model and validation +sqlalchemy<2.0 # ORM BASE fastapi # Web Framework uvicorn # ASGI Server sqlmodel # Database ORM diff --git a/requirements.txt b/requirements.txt index 814971a..b7cf194 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,8 +6,6 @@ # alembic==1.13.1 # via -r requirements.in -annotated-types==0.6.0 - # via pydantic anyio==4.3.0 # via starlette bcrypt==4.1.2 @@ -59,13 +57,12 @@ pyasn1==0.5.1 # rsa pycparser==2.21 # via cffi -pydantic==2.6.4 +pydantic==1.10.14 # via + # -r requirements.in # fastapi # fastapi-pagination # sqlmodel -pydantic-core==2.16.3 - # via pydantic pygments==2.17.2 # via rich python-jose[cryptography]==3.3.0 @@ -84,11 +81,14 @@ six==1.16.0 # via ecdsa sniffio==1.3.1 # via anyio -sqlalchemy==2.0.28 +sqlalchemy==1.4.52 # via + # -r requirements.in # alembic # sqlmodel -sqlmodel==0.0.16 +sqlalchemy2-stubs==0.0.2a38 + # via sqlmodel +sqlmodel==0.0.11 # via -r requirements.in starlette==0.36.3 # via fastapi @@ -100,8 +100,7 @@ typing-extensions==4.10.0 # fastapi # fastapi-pagination # pydantic - # pydantic-core - # sqlalchemy + # sqlalchemy2-stubs # typer uvicorn==0.28.0 # via -r requirements.in