-
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.
Merge pull request #72 from ItaloRAmaral/69-core-definir-schema-do-pr…
…isma Feature(CC-69): create psychologist endpoint and it's related methods and files
- Loading branch information
Showing
118 changed files
with
4,570 additions
and
2,965 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,26 @@ | ||
# Nx Cloud | ||
NX_CLOUD_ACCESS_TOKEN="fake-token" | ||
|
||
######### Aplication ######### | ||
|
||
# Environment | ||
NODE_ENV="development" | ||
PORT=3333 | ||
|
||
# Auth | ||
JWT_SECRET="secret" | ||
API_KEY="api-key" | ||
JWT_PRIVATE_KEY= | ||
|
||
JWT_PUBLIC_KEY= | ||
|
||
######### Database ######### | ||
|
||
# PostegreSQL Prisma | ||
POSTGRES_USER=cliniccontrol | ||
POSTGRES_PASSWORD=cliniccontrolpassword | ||
POSTGRES_DB=core-rest-api | ||
POSTGRES_HOST=localhost | ||
POSTGRES_PORT=5432 | ||
POSTGRES_SCHEMA=public | ||
|
||
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?schema=${POSTGRES_SCHEMA} |
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 |
---|---|---|
|
@@ -13,14 +13,23 @@ env: | |
jobs: | ||
tests-pipeline: | ||
runs-on: ubuntu-latest | ||
env: | ||
JWT_PRIVATE_KEY: ${{ secrets.JWT_PRIVATE_KEY }} | ||
JWT_PUBLIC_KEY: ${{ secrets.JWT_PUBLIC_KEY }} | ||
POSTGRES_USER: ${{ secrets.POSTGRES_USER }} | ||
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} | ||
POSTGRES_DB: ${{ secrets.POSTGRES_DB }} | ||
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }} | ||
POSTGRES_SCHEMA: ${{ secrets.POSTGRES_SCHEMA }} | ||
API_KEY: ${{ secrets.API_KEY }} | ||
|
||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install PNPM | ||
uses: pnpm/[email protected] | ||
|
@@ -30,5 +39,20 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run tests | ||
- name: Set up environment variables | ||
run: | | ||
echo "DATABASE_URL=postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@localhost:5432/${{ secrets.POSTGRES_DB }}?schema=${{ secrets.POSTGRES_SCHEMA }}" >> $GITHUB_ENV | ||
- name: Setting up docker compose | ||
run: docker compose up -d | ||
|
||
- name: Setting up prisma postgresql database | ||
run: | | ||
pnpm run prisma:core:schema:generate | ||
pnpm run prisma:core:schema:migrate | ||
- name: Run E2E Tests | ||
run: pnpm run test:e2e | ||
|
||
- name: Run Unit Tests | ||
run: pnpm run test:unit |
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 |
---|---|---|
|
@@ -41,4 +41,6 @@ testem.log | |
Thumbs.db | ||
|
||
# Next.js | ||
.next | ||
.next | ||
|
||
data |
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,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit "$1" | ||
npx --yes -- commitlint --edit "$1" |
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,4 +1,7 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm test:unit | ||
echo "Husky pre commit script..." | ||
echo "Running Unit Tests..." | ||
|
||
pnpm run test:unit |
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,4 @@ | ||
{ | ||
"singleQuote": true | ||
"singleQuote": true, | ||
"printWidth": 90 | ||
} |
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 |
---|---|---|
|
@@ -8,8 +8,8 @@ | |
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Luana Vefago", | ||
"email": "" | ||
"name": "Luana Vefago dos Santos", | ||
"email": "[email protected]" | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
version: '3.8' | ||
|
||
volumes: | ||
# postgresql data | ||
core-rest-api-postgres-data: | ||
driver: local | ||
|
||
services: | ||
postgres: | ||
container_name: core-rest-api-pg | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
POSTGRES_USER: cliniccontrol | ||
POSTGRES_PASSWORD: cliniccontrolpassword | ||
POSTGRES_DB: core-rest-api | ||
POSTGRES_HOST: localhost | ||
POSTGRES_PORT: 5432 | ||
POSTGRES_SCHEMA: public | ||
|
||
# PGDATA: /data/postgres | ||
volumes: | ||
# - ./data/pg:/data/postgres | ||
- core-rest-api-postgres-data:/var/lib/postgresql/data |
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
Oops, something went wrong.