Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/fix ci #244

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 0 additions & 6 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2

- name: Install poetry
run: |
cd backend
python -m pip install poetry
poetry export --with dev --format=requirements.txt --output=requirements.txt
- name: set PY
run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV
- uses: actions/cache@v1
Expand Down
13 changes: 13 additions & 0 deletions backend/bloom/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from bloom.routers.v1.vessels import router as router_vessels_v1
from bloom.routers.v1.ports import router as router_ports_v1
from bloom.routers.v1.zones import router as router_zones_v1
from starlette.middleware.cors import CORSMiddleware

from bloom.config import settings

Expand Down Expand Up @@ -36,4 +37,16 @@ async def root_api_v1(request:Request):
app.include_router(router_vessels_v1,prefix=API_PREFIX_V1,tags=["Vessels"])
app.include_router(router_zones_v1,prefix=API_PREFIX_V1,tags=["Zones"])

origins = [
"http://localhost",
"http://localhost:3000",
]


app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ env = py310

[testenv]
deps =
poetry
pytest

recreate =
Expand All @@ -12,7 +11,6 @@ recreate =
changedir = ./backend

commands =
poetry install --with dev
# tests are failing due to test database missing on github
# todo enable database for testing
#python -m pytest -vv
Expand Down
Loading