From a48dbde0ea1fc342b1f5e23a6d500e302e1f0865 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Tue, 19 Mar 2024 17:46:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=90(CI)=20add=20dummy=20data=20to=20te?= =?UTF-8?q?st-e2e=20job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To search some users we need to have some dummy data in the database. This commit adds dummy data to the database like users, teams, and identities. --- .github/workflows/people.yml | 4 ++++ Makefile | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/people.yml b/.github/workflows/people.yml index f85b81f..df08008 100644 --- a/.github/workflows/people.yml +++ b/.github/workflows/people.yml @@ -126,6 +126,10 @@ jobs: run: | make migrate + - name: Add dummy data + run: | + make demo FLUSH_ARGS='--no-input' + - name: Setup Node.js uses: actions/setup-node@v4 with: diff --git a/Makefile b/Makefile index 052d03a..c440dea 100644 --- a/Makefile +++ b/Makefile @@ -204,9 +204,10 @@ dbshell: ## connect to database shell docker compose exec app-dev python manage.py dbshell .PHONY: dbshell +resetdb: FLUSH_ARGS ?= resetdb: ## flush database and create a superuser "admin" @echo "$(BOLD)Flush database$(RESET)" - @$(MANAGE) flush + @$(MANAGE) flush $(FLUSH_ARGS) @${MAKE} superuser .PHONY: resetdb