Skip to content

Commit

Permalink
add start container
Browse files Browse the repository at this point in the history
  • Loading branch information
Badmajor committed Aug 17, 2024
1 parent 6ca65ac commit 5892f2d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/code_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:


jobs:
build:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -21,12 +21,23 @@ jobs:
restore-keys: |
${{ runner.os }}-poetry-
- name: Install python
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Run DataBase
run: docker run -d \
--name postgres_container \
-e POSTGRES_DB=rtt_test \
-e POSTGRES_USER=admin_test \
-e POSTGRES_PASSWORD=postgre_admin \
-p 5432:5432 \
postgres:14

- name: Install Poetry
uses: snok/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# DATABASE
DATABASE_DIALECT = os.getenv("DATABASE_DIALECT", "postgresql")
DATABASE_DRIVER = os.getenv("DATABASE_DRIVER", "asyncpg")
DATABASE_NAME = os.getenv("POSTGRES_DB", "rtt_dev")
DATABASE_NAME = os.getenv("POSTGRES_DB", "rtt_test")
DATABASE_USER = os.getenv("POSTGRES_USER", "admin_test")
DATABASE_PASS = os.getenv("POSTGRES_PASSWORD", "postgre_admin")
DATABASE_HOST = os.getenv("POSTGRES_HOST", "localhost")
Expand Down

0 comments on commit 5892f2d

Please sign in to comment.