Skip to content

[sub]feat: add function events #350

[sub]feat: add function events

[sub]feat: add function events #350

Workflow file for this run

name: "Test migrations"
on:
pull_request:
paths:
- 'backend/**/migrations/**'
env:
DJANGO_SETTINGS_MODULE: backend.settings.test
BACKEND_DB_NAME: backend_default
BACKEND_DB_USER: backend
BACKEND_DB_PWD: backend
BACKEND_DB_HOST: localhost
BACKEND_DB_PORT: 5432
jobs:
test-migration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: backend_default
POSTGRES_USER: backend
POSTGRES_PASSWORD: backend
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
with:
ref: main
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/[email protected]
id: cache
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install --upgrade --upgrade-strategy eager -r backend/dev-requirements.txt
- name: Run initial migration and feed data
run: |
cd backend
python manage.py migrate
python manage.py generate_fixtures
echo fixture generated
- name: Checkout local branch
uses: actions/checkout@v3
- name: Update requirements
run: |
pip install --upgrade --upgrade-strategy eager -r backend/dev-requirements.txt
- name: Test migration
run: |
python backend/manage.py migrate