-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker testing setup and recurrent todo tests
- Loading branch information
1 parent
70ad366
commit d41d23e
Showing
13 changed files
with
205 additions
and
18 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "Running debug build" | ||
|
||
echo "Building migrations" | ||
python ./manage.py makemigrations | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
services: | ||
db: | ||
image: postgres | ||
volumes: | ||
- ./data/db:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_DB=postgres | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
ports: | ||
- "5432:5432" | ||
web: | ||
build: . | ||
# command: python manage.py runserver 0.0.0.0:42069 | ||
entrypoint: bash test_startup.sh | ||
volumes: | ||
- .:/code | ||
ports: | ||
- "42069:42069" | ||
environment: | ||
- POSTGRES_DB=postgres | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_PORT=5432 | ||
- POSTGRES_HOST=db | ||
- DJANGO_SUPERUSER_USERNAME=admin | ||
- [email protected] | ||
- DJANGO_SUPERUSER_PASSWORD=admin | ||
depends_on: | ||
- db |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ sqlparse==0.5.1 | |
typing_extensions==4.12.2 | ||
coverage==7.6.1 | ||
django-htmx==1.19.0 | ||
psycopg2-binary | ||
psycopg2==2.9.9 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. | ||
|
||
class SpaceTest(TestCase): | ||
def create_test_spaces(self): | ||
pass |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
echo "Running test docker file" | ||
|
||
echo "Building migrations" | ||
python ./manage.py makemigrations | ||
|
||
echo "Applying migrations" | ||
python ./manage.py migrate | ||
|
||
echo "Running tests" | ||
python manage.py test | ||
|
||
# echo "Creating superuser" | ||
# python manage.py createsuperuser --noinput | ||
|
||
# echo "Starting Django application" | ||
# python manage.py runserver 0.0.0.0:42069 |
25 changes: 25 additions & 0 deletions
25
todos/migrations/0009_ordereduser_empty_alter_ordereduser_user.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 5.0.8 on 2024-09-20 13:21 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('hub', '0007_alter_user_selected_space'), | ||
('todos', '0008_todo_assigned_user_ordereduser_todorecurrency_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='ordereduser', | ||
name='empty', | ||
field=models.BooleanField(default=False), | ||
), | ||
migrations.AlterField( | ||
model_name='ordereduser', | ||
name='user', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='hub.user'), | ||
), | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.0.8 on 2024-09-20 13:49 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('todos', '0009_ordereduser_empty_alter_ordereduser_user'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='todorecurrency', | ||
name='started_at', | ||
field=models.DateField(auto_created=True, auto_now_add=True), | ||
), | ||
] |
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
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