Skip to content
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
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,14 @@ jobs:
steps:
- *attach_workspace
- *restore_from_workspace
- run: yarn run eslint
- run: yarn run flow
- run: yarn run stylelint
- run: ./tasks/lint.sh
# For unit testing of all packages.
test:
<<: *docker_default
steps:
- *attach_workspace
- *restore_from_workspace
- run: node_modules/.bin/lerna run test
- run: ./tasks/test.sh
# For building demo page.
test-page:
<<: *docker_default
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1.4
8.2.1
45 changes: 23 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
sudo: false
language: node_js
node_js:
- "8.2.1"
env:
global:
- YARN_VERSION=0.27.5

notifications:
email: [email protected]
services:
- docker

before_install:
- export PATH="$HOME/.yarn/bin:$PATH"
- |
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
fi

script:
- yarn run danger
- ./tasks/test.sh
- ./tasks/test-page.sh
- docker pull node:8.2.1

after_success:
- ./node_modules/.bin/codecov
install:
- echo "[Skip] Use job stage to warm up cache"

cache:
yarn: true
directories:
- ~/.yarn
- $HOME/.yarn
- node_modules
- packages/mcs-lite-introduction/node_modules

jobs:
include:
# Prepare npm and Warm up cache
- stage: Install Dependencies and Cache
script: yarn install --pure-lockfile
# Use cache
- stage: Test
script: yarn run danger
- script: yarn run postinstall && ./tasks/lint.sh
- script: yarn run postinstall && ./tasks/test-page.sh
- script: yarn run postinstall && ./tasks/test.sh
after_success:
- ./node_modules/.bin/codecov

notifications:
email: [email protected]
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ $ ./tasks/build.sh
## Testing

```
$ yarn run format
$ ./tasks/lint.sh
$ ./tasks/test.sh
$ ./tasks/test-page.sh
```

## mcs-lite-ui
Expand Down
10 changes: 10 additions & 0 deletions tasks/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e

echo -e '\n\n=================================================';
echo -e '| 1. 💪 💪 💪 Start global linting';
echo -e '=================================================\n\n';
yarn run eslint
yarn run stylelint
yarn run flow
8 changes: 0 additions & 8 deletions tasks/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

set -e

echo -e '\n\n=================================================';
echo -e '| 1. 💪 💪 💪 Start global linting';
echo -e '=================================================\n\n';
yarn run eslint
yarn run stylelint
yarn run flow


echo -e '\n\n=================================================';
echo -e '| 2. 🚐 🚐 🚐 Run test interface for each packages';
echo -e '=================================================\n\n';
Expand Down