Skip to content

Commit

Permalink
added ci stage to test main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nwanoch authored Jul 20, 2024
1 parent 1ca7c6f commit 3b20746
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PYTHON_ENV=dev
DB_TYPE=postgresql
DB_NAME=""
DB_USER=""
DB_PASSWORD=""
DB_HOST=""
DB_NAME=test
DB_USER=username
DB_PASSWORD=password
DB_HOST="localhost"
DB_PORT=5432
MYSQL_DRIVER=
DB_URL=postgresql://username:password@host:PORT/dbname
DB_URL=postgresql://username:password@localhost:5432/test
SECRET_KEY = ""
ALGORITHM = HS256
ACCESS_TOKEN_EXPIRE_MINUTES = 10
Expand Down
23 changes: 9 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main, staging, dev]
branches: [main, staging, dev, devops-main]
pull_request:
branches: [main, staging, dev]
branches: [main, staging, dev, devops-main]

jobs:
build-and-test:
Expand All @@ -14,9 +14,9 @@ jobs:
postgres:
image: postgres:latest
env:
POSTGRES_USER:
POSTGRES_PASSWORD:
POSTGRES_DB:
POSTGRES_USER: 'username'
POSTGRES_PASSWORD: "password"
POSTGRES_DB: "test"
ports:
- 5432:5432

Expand All @@ -34,16 +34,11 @@ jobs:
run: |
pip install -r requirements.txt
# - name: Copy env file
# run: cp .env.sample .env
- name: Copy env file
run: cp .env.sample .env

# - name: Copy env file for main
# if: github.ref == 'refs/heads/main'
# run: cp .env.production .env

# - name: Copy env file for staging
# if: github.ref == 'refs/heads/staging'
# run: cp .env.staging .env
- name: Run app
run: python3 main.py

# - name: Run migrations
# run: |
Expand Down

0 comments on commit 3b20746

Please sign in to comment.