Restructured Settings and Database file #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main, staging, dev] | |
pull_request: | |
branches: [main, staging, dev] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_USER: | |
POSTGRES_PASSWORD: | |
POSTGRES_DB: | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
virtual-environment: venv | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
# - 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 migrations | |
# run: | | |
# activate | |
# alembic upgrade head | |
# - name: Run tests | |
# run: | | |
# activate | |
# pytest |