-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing our build #239
Fixing our build #239
Changes from 33 commits
e2a1f88
b9492e1
6680f48
d6fcc80
8958a59
810a0c8
3b5d481
80ed2ca
49a2d44
7ee4576
4f5fe68
cec108d
0acee55
2f05c00
f51ef65
5a53afe
191a7b6
41762c7
d938aa2
515d8d2
9c839a7
3ab1233
06575b0
177be29
de67a48
d04eb6e
14d0bfa
9456f3e
07d27a0
05acbb9
dc6ec9d
4b9186b
407c64b
e8f3ee7
5281252
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag find-a-doc-api:$(date +%s) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag find-a-doc-api:$(date +%s) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18.17.0 | ||
20.5.1 |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.5.1.cjs | ||
yarnPath: .yarn/releases/yarn-3.6.3.cjs |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:18.17.1 | ||
FROM node:20.5.1 | ||
|
||
# Create app directore | ||
WORKDIR /usr/src/app | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Facility } from '../typeDefs/gqlTypes' | ||
|
||
export const fakeFacilities = () => { | ||
const facility : Facility = { | ||
nameEn: 'Zoo', | ||
nameJa: '動物園', | ||
contact: { | ||
address: { | ||
// generate fake data from type PhysicalAddress in gqlTypes.ts file | ||
addressLine1En: '1-1-1', | ||
addressLine2En: 'Ueno', | ||
cityEn: 'Taito', | ||
prefectureEn: 'Tokyo', | ||
postalCode: '100-0000' | ||
}, | ||
email: '[email protected]', | ||
phone: '08000000000', | ||
website: 'https://zoo.test.com', | ||
mapsLink: '' | ||
}, | ||
healthcareProfessionalIds: [], | ||
healthcareProfessionals: [] | ||
} | ||
|
||
return [facility] | ||
} | ||
Comment on lines
+1
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file was removed in #227 because it wasn't being used. Is there a reason we need to reintroduce the fake data? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, we want fake data.
Keep in mind this is just a starting point and we'll need to update this iteratively. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { HealthcareProfessional, Locale, LocaleName, Degree, | ||
Specialty, SpecialtyName, SpokenLanguage, Insurance } from '../typeDefs/gqlTypes' | ||
|
||
export const fakeHealthcareProfessionals = () => { | ||
const doctorDoctor : LocaleName = { | ||
lastName: 'Doctor', | ||
firstName: 'Doctor', | ||
middleName: 'MD', | ||
locale: Locale.English | ||
} | ||
const medicalDegree : Degree = { | ||
nameJa: 'メヂカル', | ||
nameEn: 'Medical', | ||
abbreviation: 'MD' | ||
} | ||
|
||
const japanese : SpokenLanguage = { | ||
iso639_3: 'ja', | ||
nameJa: '日本語', | ||
nameEn: 'Japanese', | ||
nameNative: 'Japanese' | ||
} | ||
|
||
const neurologyEn : SpecialtyName = { | ||
name: 'Neurology', | ||
locale: Locale.English | ||
} | ||
|
||
const neurology : Specialty = { | ||
names: [neurologyEn] | ||
} | ||
|
||
const healthcareProfessionalOne : HealthcareProfessional = { | ||
names: [doctorDoctor], | ||
degrees: [medicalDegree], | ||
spokenLanguages: [japanese], | ||
specialties: [neurology], | ||
acceptedInsurance: [Insurance.InternationalHealthInsurance], | ||
isDeleted: false | ||
} | ||
|
||
const name : LocaleName = { | ||
lastName: 'チェ', | ||
firstName: 'ジェイコブ', | ||
middleName: 'ベイヤード', | ||
locale: Locale.Japanese | ||
} | ||
const englishDegree : Degree = { | ||
nameJa: '英語', | ||
nameEn: 'English', | ||
abbreviation: 'En' | ||
} | ||
|
||
const english : SpokenLanguage = { | ||
iso639_3: 'en-US', | ||
nameJa: '英語', | ||
nameEn: 'English', | ||
nameNative: 'English' | ||
} | ||
|
||
const specialtyName : SpecialtyName = { | ||
name: 'Pandas', | ||
locale: Locale.English | ||
} | ||
|
||
const pandaSpecialty : Specialty = { | ||
names: [specialtyName] | ||
} | ||
|
||
const healthcareProfessionalTwo : HealthcareProfessional = { | ||
names: [name], | ||
degrees: [englishDegree], | ||
spokenLanguages: [english], | ||
specialties: [pandaSpecialty], | ||
acceptedInsurance: [Insurance.InternationalHealthInsurance], | ||
isDeleted: false | ||
} | ||
|
||
return [healthcareProfessionalOne, healthcareProfessionalTwo] | ||
} | ||
Comment on lines
+1
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file was also removed in #227 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I realized that we removed it. We shouldn't have 😅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ermish I asked this in the issue, but I'll ask it again here. What can this fake data do that auto-mocking from the schema can't? It seems like extra work to manually seed the db with files that will have to be updated and maintained. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. answered in the previous comment:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to use mock data that's autogenerated instead of seed files that will have to be updated and maintained when schema changes are made. What are your thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for tests, yes, but we're likely going to want initial seed data to have the site functional beyond testing a single endpoint. So basically, we'll want both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should use real examples then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what these are 😆