- Clone this repo to your local device
cdinto the repo directory- Run
npm install(only for the first time you run the app) - Run
npm start
- First, push to the
masterbranch (this branch is the one that's connected to our staging environment):- Make your changes on the
masterbranch - Lint your code by running
npm run lint:fixand continue only if they pass - Run all tests and continue only if they pass
git add [your changed files]git commit -m "[Card #][Your name] Your commit messagegit pull --rebase- Run all tests and continue only if they pass
git push
- Make your changes on the
- Second, push to the
releasebranch (this branch is the one that's connected to our production environment):git checkout releasegit merge mastergit push
- Checkout to the
masterbranch again (git checkout master) and check the CI pipeline builds - If the build passes, you're done!
- If the build fails, click the link highlighted below to read the errors, fix the issue, and commit/push the fix by following the instructions above

- Jest and Enzyme, ie. unit/component tests
- Run
npm testto launch the tests in watch mode - Type
ato run all tests
- Run
- Cypress, ie. end-to-end (E2E) tests
- Run
npm install(only for the first time you run the E2E tests) - Run
npm startto run the app so that Cypress can access it at localhost:3000 - In a different terminal tab/window, run
npm run cypressto launch the Cypress app and click the▶️ Run all specsbutton - To run the E2E tests in the terminal without running the Cypress app, skip steps #2 and #3, and run
npm run cypress:headless
- Run
- Packages are managed using yarn
- To install a new package, use
yarn add package-name - To make sure all pagages are installed locally, run
yarn install
When code is pushed to the master branch, you can view that code at our staging environment, hosted via Surge.
🔖_Bookmark me —_ The URL is in our team tech docs
When code is pushed to the release branch, you can view that code at our production environment, hosted via GitHub Pages.
🔖_Bookmark me —_ https://thoughtworksarts.io/a-fathers-lullaby
Both environments run through our CI pipeline via TravisCI, so for both environments, you can view pushed code only if all of the tests pass in the pipeline. You can view our pipeline here: https://travis-ci.org/thoughtworksarts/a-fathers-lullaby/builds