Skip to content

Add migration

Add migration #12

Workflow file for this run

name: Ashar CI
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.2
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ashar-project
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
max-parallel: 4
matrix:
python-version: [3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install --user pipenv
pipenv sync -d
- name: Run migrations
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: pipenv run python manage.py migrate
- name: Run Tests
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
pipenv run python manage.py test