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 306c91c4278631fa1c1dcd40f0b23f7f9e5f000d.

* Updating snapshot

* Run deploy only on master branch (not PRs)

* Use global deploy config item to avoid building on PRs
This commit is contained in:
Andrew Nicolaou 2019-05-24 18:16:15 +02:00 committed by Cassie Tarakajian
parent 18239eb2e0
commit 137ea783ea
3 changed files with 14 additions and 87 deletions

View file

@ -16,8 +16,14 @@ before_install:
install: true
script:
- docker-compose exec -T app npm run test:ci --verbose
jobs:
include:
- stage: test
name: "Linting"
script: docker-compose exec -T app npm run lint
- # stage name not required, will continue to use `test`
name: "Tests"
script: docker-compose exec -T app npm run test
before_deploy:
- docker-compose stop
@ -26,7 +32,6 @@ before_deploy:
- gcloud --quiet version
- gcloud --quiet components update
- gcloud --quiet components update kubectl
deploy:
- provider: script
script: ./deploy.sh

View file

@ -13,7 +13,7 @@ exports[`Nav renders correctly 1`] = `
className="nav__item-logo"
>
<span
className="isvg loading"
className="isvg loading svg__logo"
/>
</li>
<li
@ -23,6 +23,7 @@ exports[`Nav renders correctly 1`] = `
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseOver={[Function]}
>
<span
className="nav__item-header"
@ -36,17 +37,6 @@ exports[`Nav renders correctly 1`] = `
<ul
className="nav__dropdown"
>
<button
className="nav__dropdown-heading"
onClick={[Function]}
>
<span>
File
</span>
<span
className="isvg loading"
/>
</button>
<li
className="nav__dropdown-item"
>
@ -112,6 +102,7 @@ exports[`Nav renders correctly 1`] = `
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseOver={[Function]}
>
<span
className="nav__item-header"
@ -125,17 +116,6 @@ exports[`Nav renders correctly 1`] = `
<ul
className="nav__dropdown"
>
<button
className="nav__dropdown-heading"
onClick={[Function]}
>
<span>
Edit
</span>
<span
className="isvg loading"
/>
</button>
<li
className="nav__dropdown-item"
>
@ -215,6 +195,7 @@ exports[`Nav renders correctly 1`] = `
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseOver={[Function]}
>
<span
className="nav__item-header"
@ -228,17 +209,6 @@ exports[`Nav renders correctly 1`] = `
<ul
className="nav__dropdown"
>
<button
className="nav__dropdown-heading"
onClick={[Function]}
>
<span>
Sketch
</span>
<span
className="isvg loading"
/>
</button>
<li
className="nav__dropdown-item"
>
@ -297,44 +267,6 @@ exports[`Nav renders correctly 1`] = `
</span>
</button>
</li>
<li
className="nav__dropdown-item"
>
<button
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
>
Start Accessible
<span
className="nav__keyboard-shortcut"
>
+
Ctrl
+1
</span>
</button>
</li>
<li
className="nav__dropdown-item"
>
<button
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
>
Stop Accessible
<span
className="nav__keyboard-shortcut"
>
+
Ctrl
+2
</span>
</button>
</li>
</ul>
</li>
<li
@ -344,6 +276,7 @@ exports[`Nav renders correctly 1`] = `
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseOver={[Function]}
>
<span
className="nav__item-header"
@ -357,17 +290,6 @@ exports[`Nav renders correctly 1`] = `
<ul
className="nav__dropdown"
>
<button
className="nav__dropdown-heading"
onClick={[Function]}
>
<span>
Help & Feedback
</span>
<span
className="isvg loading"
/>
</button>
<li
className="nav__dropdown-item"
>

View file

@ -13,7 +13,7 @@
"build:server": "cross-env NODE_ENV=production webpack --config webpack/config.server.js",
"build:examples": "cross-env NODE_ENV=production webpack --config webpack/config.examples.js",
"test": "jest",
"test:ci": "npm run lint",
"test:ci": "npm run lint && npm run test",
"fetch-examples": "cross-env NODE_ENV=development node ./server/scripts/fetch-examples.js",
"fetch-examples-gg": "cross-env NODE_ENV=development node ./server/scripts/fetch-examples-gg.js",
"fetch-examples-ml5": "cross-env NODE_ENV=development node ./server/scripts/fetch-examples-ml5.js",