-
-
Notifications
You must be signed in to change notification settings - Fork 243
Establish an e2e backend instance locally and in CI/CD #2429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ahmedxgouda
wants to merge
39
commits into
OWASP:main
Choose a base branch
from
ahmedxgouda:feature/e2e-backend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+178
−1
Draft
Changes from 16 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
b5c57b4
Add dockerfile and compose and update makefile
ahmedxgouda 1e9254b
Dump db-data
ahmedxgouda 69092ce
Reorder makefile
ahmedxgouda 4002a19
Dump db-data
ahmedxgouda 0a05fdf
Remove e2e dockerfile
ahmedxgouda 58507cc
Add CI/CD
ahmedxgouda 36258b5
Merge branch 'main' into feature/e2e-backend
ahmedxgouda 4119c73
Apply rabbit's suggestions
ahmedxgouda 0688a77
Add postgres instead of pgvector
ahmedxgouda a66029c
Remove needs
ahmedxgouda 9846482
Update envs
ahmedxgouda f8be096
Fix migrations step
ahmedxgouda fbac331
Add envs to docker
ahmedxgouda 837c665
Remove migrations step
ahmedxgouda 143ce39
Remove --without test from dockerfile
ahmedxgouda 1a42d21
Copy tests in dockerfile and add needs to gh workflow
ahmedxgouda f619928
Update dockerfile
ahmedxgouda 93f3180
Merge branch 'main' into feature/e2e-backend
ahmedxgouda 8893db1
Apply suggestion
ahmedxgouda 1e39448
Use the e2e instance in the frontend e2e tests
ahmedxgouda a659f0a
Update CI/CD
ahmedxgouda 009b32c
Update CI/CD
ahmedxgouda 54f09ee
Update CI/CD
ahmedxgouda f1b0af0
Update CI/CD
ahmedxgouda 3376a65
Update CI/CD and dockerfile
ahmedxgouda 3f76de1
Update CI/CD
ahmedxgouda 0300e4e
Update CI/CD
ahmedxgouda 89ad0a6
Update CI/CD
ahmedxgouda ee3055f
Update CI/CD
ahmedxgouda 8c73507
Update CI/CD
ahmedxgouda e2f1162
Update CI/CD
ahmedxgouda bf347ef
Update CI/CD
ahmedxgouda c5909b3
Update CI/CD
ahmedxgouda fae06b4
Update CI/CD
ahmedxgouda 78cd6c8
Update CI/CD
ahmedxgouda d054d25
Update CI/CD
ahmedxgouda dcd91be
Update CI/CD
ahmedxgouda 913ffcb
Update CI/CD
ahmedxgouda ba9671b
Restore needs for the job
ahmedxgouda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Binary file not shown.
ahmedxgouda marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 hidden or 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,50 @@ | ||
| services: | ||
| backend: | ||
| container_name: nest-backend-e2e | ||
| command: > | ||
| sh -c ' | ||
| python manage.py migrate && | ||
| python manage.py runserver 0.0.0.0:8000 | ||
| ' | ||
| build: | ||
| context: ../backend | ||
| dockerfile: docker/Dockerfile | ||
| depends_on: | ||
| db: | ||
| condition: service_healthy | ||
| env_file: ../backend/.env | ||
| environment: | ||
| DJANGO_DB_HOST: ${DJANGO_DB_HOST:-db} | ||
| DJANGO_DB_NAME: ${DJANGO_DB_NAME:-nest_db_e2e} | ||
| DJANGO_DB_PASSWORD: ${DJANGO_DB_PASSWORD:-nest_user_e2e_password} | ||
| DJANGO_DB_PORT: ${DJANGO_DB_PORT:-5432} | ||
| DJANGO_DB_USER: ${DJANGO_DB_USER:-nest_user_e2e} | ||
| networks: | ||
| - nest-network | ||
| ports: | ||
| - 8000:8000 | ||
| db: | ||
| container_name: nest-db-e2e | ||
| image: pgvector/pgvector:pg16 | ||
| environment: | ||
| POSTGRES_DB: ${DJANGO_DB_NAME:-nest_db_e2e} | ||
| POSTGRES_PASSWORD: ${DJANGO_DB_PASSWORD:-nest_user_e2e_password} | ||
| POSTGRES_USER: ${DJANGO_DB_USER:-nest_user_e2e} | ||
| healthcheck: | ||
| interval: 5s | ||
| retries: 5 | ||
| test: [CMD-SHELL, pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB -h localhost -p 5432] | ||
| timeout: 5s | ||
| networks: | ||
| - nest-network | ||
| volumes: | ||
| - db-e2e-data:/var/lib/postgresql/data | ||
| ports: | ||
| - 5433:5432 | ||
|
|
||
|
|
||
| volumes: | ||
| db-e2e-data: | ||
|
|
||
| networks: | ||
| nest-network: |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.