Our latest change requires us to update the travis CI configs.
How it works:
We add an env key in the travis config to do two different builds
client directoy
server directory
These two directories will instruct travis to run two different jobs -one for the client and one for the server
In the script key, we give travis instruction of what to do in each build.
since we don't have any tests yet, we will run the install and build for react, and only the install script for nodejs
The travis file should look like this
language: node_js
node_js:
- "node"
env:
- BUILD_DIR=client
- BUILD_DIR=server
script:
- if [ "$BUILD_DIR" = "client" ]; then cd $BUILD_DIR && npm install && npm run build; fi
- if [ "$BUILD_DIR" = "server" ]; then cd $BUILD_DIR && npm install; fi
Don't copy anything that isn't clear to you. Ask me anything.
Our latest change requires us to update the travis CI configs.
How it works:
We add an
env
key in the travis config to do two different buildsThese two directories will instruct travis to run two different jobs -one for the client and one for the server
In the script key, we give travis instruction of what to do in each build.
install
andbuild
for react, and only theinstall
script for nodejsThe travis file should look like this
Don't copy anything that isn't clear to you. Ask me anything.