Skip to content

Commit 4e8c5e0

Browse files
Jiansengaearon
authored andcommitted
Add notes on enabling Travis CI for created repo (#677)
1 parent 8e5183a commit 4e8c5e0

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

packages/react-scripts/template/README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,15 +791,35 @@ Note that tests run much slower with coverage so it is recommended to run it sep
791791
792792
By default `npm test` runs the watcher with interactive CLI. However, you can force it to run tests once and finish the process by setting an environment variable called `CI`. Popular CI servers already set it by default but you can do this yourself too:
793793
794-
#### Windows (cmd.exe)
794+
### On CI servers
795+
#### Travis CI
796+
797+
1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your Github repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page.
798+
1. Add a `.travis.yml` file to your git repository.
799+
```
800+
language: node_js
801+
node_js:
802+
- 4
803+
- 6
804+
cache:
805+
directories:
806+
- node_modules
807+
script
808+
- npm test
809+
```
810+
1. Trigger your first build with a git push.
811+
1. [Customize your Travis CI Build](https://docs.travis-ci.com/user/customizing-the-build/) if needed.
812+
813+
### On your own environment
814+
##### Windows (cmd.exe)
795815
796816
```cmd
797817
set CI=true&&npm test
798818
```
799819
800820
(Note: the lack of whitespace is intentional.)
801821
802-
#### Linux, OS X (Bash)
822+
##### Linux, OS X (Bash)
803823
804824
```bash
805825
CI=true npm test

0 commit comments

Comments
 (0)