-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
48 additions
and
25 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 |
---|---|---|
|
@@ -21,6 +21,8 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: poetry | ||
cache-dependency-path: backend/poetry.lock | ||
python-version: '3.12' | ||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
|
@@ -58,6 +60,8 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: poetry | ||
cache-dependency-path: backend/poetry.lock | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
|
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,40 +1,46 @@ | ||
build: | ||
@docker compose build | ||
@CMD="poetry install" $(MAKE) run-backend-local-command | ||
@CMD="poetry run python manage.py migrate" $(MAKE) run-backend-local-command | ||
@CMD="poetry install" $(MAKE) run-backend-command | ||
@CMD="poetry run python manage.py migrate" $(MAKE) run-backend-command | ||
|
||
collect-static: | ||
@CMD="poetry run python manage.py collectstatic --noinput" $(MAKE) run-backend-local-command | ||
@CMD="poetry run python manage.py collectstatic --noinput" $(MAKE) run-backend-command | ||
|
||
github-sync-owasp-organization: | ||
@CMD="poetry run python manage.py github_sync_owasp_organization" $(MAKE) run-backend-command | ||
|
||
github-sync-related-repositories: | ||
@CMD="poetry run python manage.py github_sync_related_repositories" $(MAKE) run-backend-command | ||
|
||
migrate: | ||
@CMD="poetry run python manage.py migrate" $(MAKE) run-backend-local-command | ||
@CMD="poetry run python manage.py migrate" $(MAKE) run-backend-command | ||
|
||
migrations: | ||
@CMD="poetry run python manage.py makemigrations" $(MAKE) run-backend-local-command | ||
@CMD="poetry run python manage.py makemigrations" $(MAKE) run-backend-command | ||
|
||
run: | ||
@docker compose up | ||
owasp-scrape-site-data: | ||
@CMD="poetry run python manage.py owasp_scrape_site_data" $(MAKE) run-backend-command | ||
|
||
owasp-update-projects: | ||
@CMD="poetry run python manage.py owasp_update_projects" $(MAKE) run-backend-command | ||
|
||
pre-commit: | ||
@pre-commit run -a | ||
|
||
run-backend-local-command: | ||
@docker compose run --rm backend-local $(CMD) | ||
run: | ||
@docker compose up | ||
|
||
run-backend-command: | ||
@docker compose run --rm backend $(CMD) | ||
|
||
shell: | ||
@CMD="/bin/bash" $(MAKE) run-backend-local-command | ||
@CMD="/bin/bash" $(MAKE) run-backend-command | ||
|
||
sync: | ||
$(MAKE) github-sync-owasp-organization | ||
$(MAKE) owasp-scrape-site-data | ||
$(MAKE) github-sync-related-repositories | ||
$(MAKE) owasp-update-projects | ||
|
||
test: | ||
@cd backend && poetry run pytest; cd .. | ||
|
||
github-sync-owasp-organization: | ||
@CMD="poetry run python manage.py github_sync_owasp_organization" $(MAKE) run-backend-local-command | ||
|
||
github-sync-related-repositories: | ||
@CMD="poetry run python manage.py github_sync_related_repositories" $(MAKE) run-backend-local-command | ||
|
||
owasp-scrape-site-data: | ||
@CMD="poetry run python manage.py owasp_scrape_site_data" $(MAKE) run-backend-local-command | ||
|
||
owasp-update-projects: | ||
@CMD="poetry run python manage.py owasp_update_projects" $(MAKE) run-backend-local-command |
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,5 @@ | ||
services: | ||
backend-local: | ||
backend: | ||
container_name: nest-backend | ||
command: > | ||
bash -c | ||
|