-
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.
- Loading branch information
1 parent
17156fa
commit 8098ee7
Showing
8 changed files
with
165 additions
and
0 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 @@ | ||
db-init/create-multiple-dbs.sh eol=lf |
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 @@ | ||
## Notion ticket link | ||
<!-- Please replace with your ticket's URL --> | ||
[Ticket Name](https://www.notion.so/uwblueprintexecs/Task-Board-86718c51ea274d06803384b2f8f5d201?p=b3af65cb12b44158895dfc77ff938436&pm=s) | ||
|
||
|
||
<!-- Give a quick summary of the implementation details, provide design justifications if necessary --> | ||
## Implementation description | ||
* | ||
|
||
|
||
<!-- What should the reviewer do to verify your changes? Describe expected results and include screenshots when appropriate --> | ||
## Steps to test | ||
1. | ||
|
||
|
||
<!-- Draw attention to the substantial parts of your PR or anything you'd like a second opinion on --> | ||
## What should reviewers focus on? | ||
* | ||
|
||
|
||
## Checklist | ||
- [ ] My PR name is descriptive and in imperative tense | ||
- [ ] My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits | ||
- [ ] I have run the appropriate linter(s) | ||
- [ ] I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR |
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,33 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy frontend to Firebase Hosting | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "frontend/**" | ||
|
||
defaults: | ||
run: | ||
working-directory: frontend | ||
|
||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: echo "REACT_APP_BACKEND_URL=${{ secrets.DEV_BACKEND_URL }}" > .env | ||
auth { | ||
- run: echo "REACT_APP_OAUTH_CLIENT_ID=${{ secrets.DEV_OAUTH_CLIENT_ID }}" >> .env | ||
} auth | ||
- run: rm -rf node_modules && yarn install --frozen-lockfile && yarn build | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_UW_BLUEPRINT_STARTER_CODE }}" | ||
channelId: live | ||
projectId: "${{ secrets.DEV_PROJECT_ID }}" | ||
entryPoint: ./frontend |
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,31 @@ | ||
# This file was auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy frontend to Firebase Hosting preview | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "frontend/**" | ||
|
||
defaults: | ||
run: | ||
working-directory: frontend | ||
|
||
jobs: | ||
build_and_preview: | ||
if: "${{ github.event.pull_request.head.repo.full_name == github.repository && github.base_ref == 'dev' }}" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: echo "REACT_APP_BACKEND_URL=${{ secrets.PREVIEW_BACKEND_URL }}" > .env | ||
auth { | ||
- run: echo "REACT_APP_OAUTH_CLIENT_ID=${{ secrets.DEV_OAUTH_CLIENT_ID }}" >> .env | ||
} auth | ||
- run: rm -rf node_modules && yarn install --frozen-lockfile && yarn build | ||
- uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_UW_BLUEPRINT_STARTER_CODE }}" | ||
projectId: "${{ secrets.DEV_PROJECT_ID }}" | ||
entryPoint: ./frontend |
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,60 @@ | ||
name: Lint codebase | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
paths: | ||
- "frontend/**" | ||
- "backend/typescript/**" | ||
pull_request: | ||
branches: | ||
- dev | ||
paths: | ||
- "frontend/**" | ||
- "backend/typescript/**" | ||
|
||
jobs: | ||
run-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Filter changed files | ||
uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
frontend: | ||
- "frontend/**" | ||
typescript-backend: | ||
- "backend/typescript/**" | ||
- name: Set up Node.js | ||
if: steps.changes.outputs.frontend == 'true' || steps.changes.outputs.typescript-backend == 'true' | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18.18.2" | ||
cache: "yarn" | ||
cache-dependency-path: | | ||
frontend/yarn.lock | ||
backend/typescript/yarn.lock | ||
- name: Install Node.js dependencies | ||
if: steps.changes.outputs.frontend == 'true' || steps.changes.outputs.typescript-backend == 'true' | ||
run: yarn --cwd ./frontend --prefer-offline && yarn --cwd ./backend/typescript --prefer-offline | ||
|
||
- name: Generate Prisma Data Models | ||
working-directory: ./ | ||
run: npx prisma generate && yarn tsc | ||
|
||
- name: Lint frontend | ||
if: steps.changes.outputs.frontend == 'true' | ||
working-directory: ./frontend | ||
run: yarn lint | ||
|
||
- name: Lint TypeScript backend | ||
if: steps.changes.outputs.typescript-backend == 'true' | ||
working-directory: ./backend/typescript | ||
run: yarn lint |
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,4 @@ | ||
import { PrismaClient } from "@prisma/client"; | ||
|
||
const prisma = new PrismaClient(); | ||
export default prisma; |
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,10 @@ | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
datasource db { | ||
provider = "postgresql" | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
|
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