chore(backend): force token expire #475
Workflow file for this run
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: "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@v4 | |
with: | |
ref: main | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
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@v4 | |
- name: Update requirements | |
run: | | |
pip install --upgrade --upgrade-strategy eager -r backend/dev-requirements.txt | |
- name: Test migration | |
run: | | |
python backend/manage.py migrate |