-
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 #11 from wrideveloper/feat/data-access-layer
feat: initial setup for data access layer and tests
- Loading branch information
Showing
11 changed files
with
1,250 additions
and
36 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
MONGO_USERNAME=admin | ||
MONGO_PASSWORD=password | ||
MONGO_HOST=localhost | ||
MONGO_PORT=27017 | ||
MONGO_DB=onlyforms |
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,41 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: "11 18 * * 6" | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ typescript, javascript ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
queries: +security-and-quality | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
with: | ||
category: "/language:${{ matrix.language }}" |
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,50 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
onlyforms: | ||
name: Onlyforms | ||
runs-on: ubuntu-latest | ||
container: node:20 | ||
timeout-minutes: 30 | ||
services: | ||
mongodb: | ||
image: mongo:latest | ||
volumes: | ||
- dbdata:/data/db | ||
ports: | ||
- 27017:27017 | ||
env: | ||
MONGO_INITDB_ROOT_USERNAME: admin | ||
MONGO_INITDB_ROOT_PASSWORD: password | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
id: pnpm-install | ||
with: | ||
version: latest | ||
run_install: false | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Test | ||
run: pnpm test | ||
env: | ||
MONGO_USERNAME: admin | ||
MONGO_PASSWORD: password | ||
MONGO_HOST: mongodb | ||
MONGO_PORT: 27017 | ||
MONGO_DB: onlyforms |
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,15 @@ | ||
version: '3' | ||
|
||
services: | ||
db: | ||
image: mongo:latest | ||
volumes: | ||
- dbdata:/data/db | ||
ports: | ||
- ${MONGO_PORT:-27017}:27017 | ||
environment: | ||
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME:-admin} | ||
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD:-password} | ||
|
||
volumes: | ||
dbdata: |
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,36 +1,40 @@ | ||
{ | ||
"name": "interview", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"format": "prettier src --write" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/kit": "^1.20.4", | ||
"autoprefixer": "^10.4.14", | ||
"postcss": "^8.4.24", | ||
"postcss-load-config": "^4.0.1", | ||
"prettier": "^3.0.3", | ||
"svelte": "^4.0.5", | ||
"svelte-check": "^3.4.3", | ||
"tailwindcss": "^3.3.2", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.4.2" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"bits-ui": "^0.5.7", | ||
"clsx": "^2.0.0", | ||
"lucide-svelte": "^0.285.0", | ||
"tailwind-merge": "^1.14.0", | ||
"tailwind-variants": "^0.1.14", | ||
"zod": "^3.22.4" | ||
} | ||
"name": "interview", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"format": "prettier src --write", | ||
"test": "vitest run", | ||
"test:tdd": "vitest run --watch" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.0.0", | ||
"@sveltejs/kit": "^1.20.4", | ||
"autoprefixer": "^10.4.14", | ||
"postcss": "^8.4.24", | ||
"postcss-load-config": "^4.0.1", | ||
"prettier": "^3.0.3", | ||
"svelte": "^4.0.5", | ||
"svelte-check": "^3.4.3", | ||
"tailwindcss": "^3.3.2", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"vite": "^4.4.2" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"bits-ui": "^0.5.7", | ||
"clsx": "^2.0.0", | ||
"lucide-svelte": "^0.285.0", | ||
"mongodb": "^6.3.0", | ||
"tailwind-merge": "^1.14.0", | ||
"tailwind-variants": "^0.1.14", | ||
"vitest": "^1.2.0", | ||
"zod": "^3.22.4" | ||
} | ||
} |
Oops, something went wrong.