-
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.
feat/CI-CD-to-run-tests-on-merge (#38)
* feat(CI): add first version of backend CI to run tests * feat(CI/CD): add entrypoint scripts for backend docker * fix(backend.yaml): wait for services to be healthy
- Loading branch information
1 parent
05f4e63
commit f148482
Showing
13 changed files
with
100 additions
and
102 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
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,8 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
npx prisma generate | ||
npx prisma migrate deploy | ||
|
||
npm run dev |
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
9 changes: 0 additions & 9 deletions
9
back/prisma/migrations/20231113135109_create_user/migration.sql
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
back/prisma/migrations/20231113152055_add_lucia_auth/migration.sql
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
back/prisma/migrations/20231120134558_initial_migration/migration.sql
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,46 @@ | ||
-- CreateTable | ||
CREATE TABLE "User" ( | ||
"id" TEXT NOT NULL, | ||
|
||
CONSTRAINT "User_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Session" ( | ||
"id" TEXT NOT NULL, | ||
"user_id" TEXT NOT NULL, | ||
"active_expires" BIGINT NOT NULL, | ||
"idle_expires" BIGINT NOT NULL, | ||
|
||
CONSTRAINT "Session_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateTable | ||
CREATE TABLE "Key" ( | ||
"id" TEXT NOT NULL, | ||
"hashed_password" TEXT, | ||
"user_id" TEXT NOT NULL, | ||
|
||
CONSTRAINT "Key_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "User_id_key" ON "User"("id"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Session_id_key" ON "Session"("id"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "Session_user_id_idx" ON "Session"("user_id"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "Key_id_key" ON "Key"("id"); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "Key_user_id_idx" ON "Key"("user_id"); | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Session" ADD CONSTRAINT "Session_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Key" ADD CONSTRAINT "Key_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; |
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,3 @@ | ||
# Please do not edit this file manually | ||
# It should be added in your version-control system (i.e. Git) | ||
provider = "mysql" | ||
provider = "postgresql" |
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,8 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
npx prisma generate | ||
npx prisma migrate deploy | ||
|
||
npm run test |
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,6 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
npx prisma migrate dev | ||
npm run test |