Skip to content

Commit

Permalink
Separate JavaScript lint/flow checks from tests
Browse files Browse the repository at this point in the history
Summary:
This should help make it clearer, at a glance, which specific step is failing.

Run on Circle. Workflows will now show that Node 8 JS tests are green, but Node 6 JS tests are not. Lint/flow checks are also not green. Previously, it would be necessary to open the two test-node workflows to investigate which particular test failed. Given these tests and checks tend to break often, the additional clarity would be helpful.

<img width="485" alt="screen shot 2017-12-20 at 9 40 07 am" src="https://user-images.githubusercontent.com/165856/34220526-ce3d3b26-e569-11e7-803f-0e4bf1090f2f.png">
Closes #17293

Differential Revision: D6612623

Pulled By: hramos

fbshipit-source-id: c84351da50916e72e52c4271e2a31c16f6cdfbb9
  • Loading branch information
hramos authored and facebook-github-bot committed Dec 20, 2017
1 parent 59c7967 commit 5ea5683
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,16 @@ aliases:
- &run-node-tests
|
npm test -- --maxWorkers=2

- &run-lint-checks
|
npm run lint

- &run-flow-checks
|
npm run flow -- check


- &filter-only-master-stable
branches:
only:
Expand Down Expand Up @@ -171,8 +178,8 @@ android_defaults: &android_defaults

version: 2
jobs:
# Runs JavaScript tests on Node 8
test-js-node-8:
# Runs JavaScript lint and flow checks
run-js-checks:
<<: *defaults
docker:
- image: circleci/node:8
Expand All @@ -181,25 +188,26 @@ jobs:
- restore-cache: *restore-node-cache
- run: *install-node-dependencies
- save-cache: *save-node-cache
- run: *run-node-tests
- run: *run-lint-checks
- run: *run-flow-checks

# Runs JavaScript tests on Node 6
test-js-node-6:
# Runs JavaScript tests on Node 8
test-js-node-8:
<<: *defaults
docker:
- image: circleci/node:6.11.0
- image: circleci/node:8
steps:
- checkout
- restore-cache: *restore-node-cache
- run: *install-node-dependencies
- save-cache: *save-node-cache
- run: *run-node-tests

# Runs JavaScript tests on Node 4
test-js-node-4:
# Runs JavaScript tests on Node 6
test-js-node-6:
<<: *defaults
docker:
- image: circleci/node:4.8.4
- image: circleci/node:6
steps:
- checkout
- restore-cache: *restore-node-cache
Expand Down Expand Up @@ -457,7 +465,11 @@ workflows:
build:
jobs:

# Test Javascript on Node 8 and 6
# Run lint and flow checks
- run-js-checks:
filters: *filter-ignore-gh-pages

# Test JavaScript on Node 8 and 6
- test-js-node-8:
filters: *filter-ignore-gh-pages
- test-js-node-6:
Expand Down

0 comments on commit 5ea5683

Please sign in to comment.