-
Notifications
You must be signed in to change notification settings - Fork 1
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 #45 from Lercerss/docker-ci
[#36] Set up circleCI with docker
- Loading branch information
Showing
20 changed files
with
352 additions
and
182 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,42 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
machine: | ||
image: ubuntu-1604:201903-01 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build docker image for frontend linting | ||
command: docker build --target=lint -t graphelier-app-lint ./app | ||
- run: | ||
name: Build docker image for frontend testing | ||
command: docker build --target=test -t graphelier-app-test ./app | ||
|
||
- run: | ||
name: Build docker image for backend linting | ||
command: docker build --target=lint -t graphelier-service-lint ./core | ||
|
||
- run: | ||
name: Build docker image for scripts linting | ||
command: docker build --target=lint -t graphelier-scripts-lint ./core/scripts | ||
- run: | ||
name: Build docker image for scripts testing | ||
command: docker build --target=test -t graphelier-scripts-test ./core/scripts | ||
|
||
- run: | ||
name: Run the container for frontend linting | ||
command: docker run graphelier-app-lint | ||
- run: | ||
name: Run the container for frontend testing | ||
command: docker run graphelier-app-test | ||
|
||
- run: | ||
name: Run the container for backend linting | ||
command: docker run graphelier-service-lint | ||
|
||
- run: | ||
name: Run the container for scripts linting | ||
command: docker run graphelier-scripts-lint | ||
- run: | ||
name: Run the container for scripts testing | ||
command: docker run graphelier-scripts-test |
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,9 +1,45 @@ | ||
# Graphelier | ||
|
||
[](https://circleci.com/gh/Lercerss/graphelier) | ||
Displays detailed exchange order book contents | ||
|
||
## Running the Application | ||
|
||
```sh | ||
docker-compose up | ||
``` | ||
|
||
## Running the frontend linter with docker | ||
|
||
```sh | ||
docker build --target=lint -t graphelier-app-lint ./app | ||
docker run graphelier-app-lint | ||
``` | ||
|
||
## Running the frontend tests with docker | ||
|
||
```sh | ||
docker build --target=test -t graphelier-app-test ./app | ||
docker run graphelier-app-test | ||
``` | ||
|
||
## Running the backend linter with docker | ||
|
||
```sh | ||
docker build --target=lint -t graphelier-service-test ./core | ||
docker run graphelier-service-test | ||
``` | ||
|
||
## Running the python scripts linter with docker | ||
|
||
```sh | ||
docker build --target=lint -t graphelier-scripts-lint ./core/scripts | ||
docker run graphelier-scripts-lint | ||
``` | ||
|
||
## Running the python scripts' tests with docker | ||
|
||
```sh | ||
docker build --target=test -t graphelier-scripts-test ./core/scripts | ||
docker run graphelier-scripts-test | ||
``` |
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,13 +1,17 @@ | ||
FROM node:10.16.3 | ||
|
||
FROM node:10.16.3 AS base | ||
WORKDIR /app | ||
|
||
COPY package*.json /app/ | ||
|
||
FROM base AS builder | ||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 3000 | ||
|
||
FROM builder AS dev | ||
CMD [ "npm", "start" ] | ||
|
||
FROM builder AS test | ||
ENV CI true | ||
CMD [ "npm", "test" ] | ||
|
||
FROM builder AS lint | ||
CMD [ "npm", "run", "lint", "src/" ] |
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,48 +1,49 @@ | ||
{ | ||
"name": "app", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@material-ui/core": "^4.4.2", | ||
"@material-ui/styles": "^4.4.1", | ||
"axios": "^0.19.0", | ||
"classnames": "^2.2.6", | ||
"moment": "^2.24.0", | ||
"nano-date": "^4.1.0", | ||
"react": "^16.9.0", | ||
"react-dom": "^16.9.0", | ||
"react-redux": "^7.1.1", | ||
"react-scripts": "3.1.1", | ||
"redux": "^4.0.4", | ||
"redux-thunk": "^2.3.0" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"devDependencies": { | ||
"axios-logger": "^2.2.1", | ||
"babel-eslint": "10.0.2", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.15.1", | ||
"eslint": "^6.4.0", | ||
"react-test-renderer": "^16.10.2" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
"name": "app", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"@material-ui/core": "^4.4.2", | ||
"@material-ui/styles": "^4.4.1", | ||
"axios": "^0.19.0", | ||
"classnames": "^2.2.6", | ||
"moment": "^2.24.0", | ||
"nano-date": "^4.1.0", | ||
"react": "^16.9.0", | ||
"react-dom": "^16.9.0", | ||
"react-redux": "^7.1.1", | ||
"react-scripts": "3.1.1", | ||
"redux": "^4.0.4", | ||
"redux-thunk": "^2.3.0" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject", | ||
"lint": "eslint" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"devDependencies": { | ||
"axios-logger": "^2.2.1", | ||
"babel-eslint": "10.0.2", | ||
"enzyme": "^3.10.0", | ||
"enzyme-adapter-react-16": "^1.15.1", | ||
"eslint": "^6.4.0", | ||
"react-test-renderer": "^16.10.2" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
Oops, something went wrong.