-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: server test with docker CI #36
base: main
Are you sure you want to change the base?
Conversation
uses: actions/checkout@v2 | ||
|
||
- name: Login to DockerHub | ||
run: docker login -u $DOCKER_USER -p $DOCKER_PASS |
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.
Why are we logging to DockerHub again? Can we not use the Dockerfile
from this repo?
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.
We need to login for Dockerfile to PULL images.
server/Dockerfile
Outdated
WORKDIR /usr/app | ||
COPY ./types.d.ts ../ | ||
COPY . . | ||
RUN npm install typescript -g && npm install |
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.
How can you not notice extra spaces? Also why are we installing typescript separately, it's already a dev dependency
RUN npm install typescript -g && npm install | |
RUN npm install typescript -g && npm install |
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.
We are installing typescript globally for using command tsc
server/docker-compose.yml
Outdated
postgres: | ||
image: postgres | ||
ports: | ||
- "35432:5432" |
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.
typo
server/jest.config.js
Outdated
preset: "ts-jest", | ||
testEnvironment: "node", | ||
moduleNameMapper: { | ||
"@exmpl/(.*)": "<rootDir>/src/$1", |
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 don't think this is being used anywhere
const response = await request(app).get("/notes/99"); | ||
test("GET request by a random id to get 404 response", async () => { | ||
const response = await request(app).get( | ||
"/notes/c61f1fc9-e0d2-43ce-a6c1-b5436cdebe7d" |
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.
Where is c61f1fc9-e0d2-43ce-a6c1-b5436cdebe7d
coming from
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.
It's just an example in uuid format as 99
is invalid now.
server/types.d.ts
Outdated
@@ -0,0 +1,10 @@ | |||
interface Note { |
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 despise duplicated code, don't we already have types?
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've temporarily added it for ease for work.
…m/ancora-imparo/notes into KB-147-server-test-with-docker-ci
No description provided.