Skip to content

Commit

Permalink
fix(package.json): use the same naming convention for scripts (uber#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
gergelyke authored Sep 12, 2018
1 parent 5a3fcb8 commit f9a45e1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ steps:
agents:
queue: workers
- name: ':selenium: :chromium:'
command: yarn test-e2e
command: yarn e2e:test
plugins:
'docker-compose':
run: e2e-test-chrome
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ COPY . .
# Perform any build steps if you want binaries inside of the image
RUN yarn build
RUN yarn build-storybook
RUN yarn build-e2e
RUN yarn e2e:build
18 changes: 11 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,43 @@ version: '2.1'
services:
chrome-standalone:
image: selenium/standalone-chrome:latest@sha256:cdc74f75669a6578e8545dba01477e367a793d354d6cb40609ace7379fe9b1fc
network_mode: "host"
network_mode: 'host'
restart: always
ports:
- "4444:4444"
- '4444:4444'

e2e-server:
build: .
command: node e2e/serve.js
expose:
- 8080
ports:
- "8080:8080"
- '8080:8080'
# network_mode: "host"
healthcheck:
test: ["CMD-SHELL", "curl -H \"Accept: text/html\" -f http://localhost:8080 || exit 1"]
test:
[
'CMD-SHELL',
'curl -H "Accept: text/html" -f http://localhost:8080 || exit 1',
]
interval: 5s
timeout: 10s
retries: 5

e2e-server-healthy:
build: .
network_mode: "host"
network_mode: 'host'
depends_on:
e2e-server:
condition: service_healthy

e2e-test-chrome:
build: .
network_mode: "host"
network_mode: 'host'
depends_on:
- chrome-standalone
- e2e-server-healthy
command: yarn test-e2e
command: yarn e2e:test
environment:
- CODECOV_TOKEN
- CI=true
Expand Down
4 changes: 2 additions & 2 deletions e2e/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ build.stderr.on('data', data => {
});

build.on('exit', function() {
const serve = spawn('yarn', ['serve-e2e']);
const serve = spawn('yarn', ['e2e:serve']);

serve.stdout.on('data', data => {
console.log(`serve stdout:\n${data}`);

if (String(data).includes('listening')) {
const test = spawn('yarn', ['test-e2e']);
const test = spawn('yarn', ['e2e:test']);

test.stdout.on('data', data => {
console.log(`test stdout:\n${data}`);
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
"module": "baseui.es.js",
"repository": "uber-web/baseui",
"scripts": {
"lintcode": "eslint ./",
"lint": "yarn run lintcode && markdownlint -c ./.markdownlint.json rfcs README.md",
"lint:code": "eslint ./",
"lint:markdown": "markdownlint -c ./.markdownlint.json rfcs README.md",
"lint": "yarn lint:code && yarn lint:markdown",
"commitmsg": "commitlint -e $GIT_PARAMS",
"test": "yarn lint && yarn flow && yarn unit-test",
"storybook": "start-storybook -p 6006",
Expand All @@ -27,10 +28,10 @@
"build": "yarn build:es2015 && yarn build:es2015modules && yarn build:es && yarn build:copy-files",
"unit-test": "yarn jest --coverage",
"e2e": "node ./e2e/e2e.js",
"build-e2e": "webpack --config webpack.e2e.config.js --mode=production",
"serve-e2e": "node e2e/serve.js",
"e2e:build": "webpack --config webpack.e2e.config.js --mode=production",
"e2e:serve": "node e2e/serve.js",
"e2e:test": "jest --config=jest-e2e.config.js",
"release": "yarn build && npm publish dist",
"test-e2e": "jest --config=jest-e2e.config.js",
"license": "license-check-and-add"
},
"devDependencies": {
Expand Down

0 comments on commit f9a45e1

Please sign in to comment.