Skip to content

Commit 5bf2835

Browse files
andrewncatarak
authored andcommitted
Experiment with "Checks" in Travis output (#1081)
* Run tests on CI * Create a lint error on purpose * Splits build into test and deploy stages lint and test jobs will run in parallel and if both are successful (and branch is master), deploy will run. * Revert "Create a lint error on purpose" This reverts commit 306c91c. * Updating snapshot * Run deploy only on master branch (not PRs) * Use global deploy config item to avoid building on PRs
1 parent 7c4f180 commit 5bf2835

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ before_install:
1616

1717
install: true
1818

19-
script:
20-
- docker-compose exec -T app npm run test:ci --verbose
19+
jobs:
20+
include:
21+
- stage: test
22+
name: "Linting"
23+
script: docker-compose exec -T app npm run lint
24+
- # stage name not required, will continue to use `test`
25+
name: "Tests"
26+
script: docker-compose exec -T app npm run test
2127

2228
before_deploy:
2329
- docker-compose stop
@@ -26,7 +32,6 @@ before_deploy:
2632
- gcloud --quiet version
2733
- gcloud --quiet components update
2834
- gcloud --quiet components update kubectl
29-
3035
deploy:
3136
- provider: script
3237
script: ./deploy.sh

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build:server": "cross-env NODE_ENV=production webpack --config webpack/config.server.js",
1414
"build:examples": "cross-env NODE_ENV=production webpack --config webpack/config.examples.js",
1515
"test": "jest",
16-
"test:ci": "npm run lint",
16+
"test:ci": "npm run lint && npm run test",
1717
"fetch-examples": "cross-env NODE_ENV=development node ./server/scripts/fetch-examples.js",
1818
"fetch-examples-gg": "cross-env NODE_ENV=development node ./server/scripts/fetch-examples-gg.js",
1919
"fetch-examples-ml5": "cross-env NODE_ENV=development node ./server/scripts/fetch-examples-ml5.js",

0 commit comments

Comments
 (0)