Skip to content
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

FEATURE: Implement a docker file for test-suite #67

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker-compose.yaml
docker-compose.yml
.dockerignore
**/Dockerfile
**/node_modules
Expand Down
16 changes: 13 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
version: '3.8'
services:
mock-app:
build:
build:
context: .
dockerfile: Dockerfile
args:
- CONFIG_FILE=./app-config.json
ports:
- 3000:80
ports:
- 3000:80

test_suite:
container_name: test_suite
build:
context: ./packages/untp-test-suite/
dockerfile: Dockerfile
command: yarn nodemon --watch . --ext js,ts,json --exec "yarn run untp test"
volumes:
- ./packages/untp-test-suite/:/app
- /app/node_modules
5 changes: 5 additions & 0 deletions packages/untp-test-suite/.Dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker-compose.yml
.dockerignore
node_modules
build
Dockerfile
20 changes: 20 additions & 0 deletions packages/untp-test-suite/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:20.12.2
WORKDIR /app

COPY . .

RUN yarn install
RUN yarn add @types/node @types/lodash @types/semver --dev
RUN yarn add nodemon --dev

RUN yarn build

RUN yarn run build

RUN yarn run untp

RUN yarn run untp config

RUN yarn run untp test
Comment on lines +12 to +18
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution, I am a bit confused here, I don't think we need these commands. Should we remove them?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@husamahmud @EmadAnwer if you want to answer in here


CMD ["yarn", "nodemon", "--watch", ".", "--ext", "js,ts,json", "--exec", "yarn run untp test"]
11 changes: 11 additions & 0 deletions packages/untp-test-suite/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.8'

services:
test_suite:
build:
context: .
dockerfile: Dockerfile
command: yarn nodemon --watch . --ext js,ts,json --exec "yarn run untp test"
volumes:
- .:/app
- /app/node_modules