Skip to content

Commit

Permalink
Merge pull request #12 from DigitalProductInnovationAndDevelopment/up…
Browse files Browse the repository at this point in the history
…date-pipeline-with-migrations

fix(no-ticket): update test.yml with migrations
  • Loading branch information
betulkaraagoz authored Aug 13, 2024
2 parents 4ee4d5c + d90a78b commit f1cb3ee
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,27 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
- name: Run migrations
run: |
python manage.py makemigrations
python manage.py migrate
- name: Insert fixture data
run: |
chmod +x scripts/create_fixture_data.sh
./scripts/create_fixture_data.sh
- name: Insert dummy data if DB is empty
run: |
chmod +x scripts/create_dummy_data.sh
./scripts/create_dummy_data.sh
- name: Start Django server in the background
run: |
python manage.py runserver 0.0.0.0:8000 &
env:
MYSQL_ACTIVE: false

- name: Run tests
run: |
python manage.py test
- name: Stop Django server
run: |
kill $(lsof -t -i:8000) || echo "Server stopped"

0 comments on commit f1cb3ee

Please sign in to comment.