Skip to content

Commit

Permalink
video 158 fix for failing travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
doolin committed Feb 20, 2021
1 parent 9e22b3e commit 2912b95
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,33 @@ The default.conf should now look like this:
}
}
```

## Video 158 Fix for Failing Travis Builds

In the upcoming lecture, we will be adding a script to our .travis.yml file. Due to a change in how the Jest library works with Create React App, we need to make a small modification:

```yaml
script:
- docker run USERNAME/react-test npm test -- --coverage
```

instead should be:

```yaml
script:
- docker run -e CI=true USERNAME/react-test npm test -- --coverage
```

You can read up on the CI=true variable here:

https://facebook.github.io/create-react-app/docs/running-tests#linux-macos-bash

and environment variables in Docker here:

https://docs.docker.com/engine/reference/run/#env-environment-variables

Additionally, you may want to set the following property if your travis build fails with “rakefile not found” by adding to the top of your .travis.yml file:

```yaml
language: generic
```

0 comments on commit 2912b95

Please sign in to comment.