-
Notifications
You must be signed in to change notification settings - Fork 71.9k
Deploy a test branch
- Identify the test branch in the Nightscout repository
- Update the dev branch in your personal repository
- Create a test branch in your repository (if necessary)
- Update your test branch (if necessary)
- Deploy your test website
- Website setup examples
Choosing a test branch is easy. Use the list below to help you understand how the repository is organized.
- dev - The dev branch feeds new code to future release branches and eventually to master. Dev changes frequently and not everything in dev makes it into master. Deploy dev to test new features or bug fixes before they're pushed to a release branch.
- release/name - Release branches freeze a snapshot of the dev branch. Releases are used for final testing before pushing to master. At this stage, the focus is squashing last minute bugs. Deploy the latest release branch to assist with final testing before the code is pushed to master.
- wip/name - The wip branches are snapshots of the dev branch. They are used to develop a new feature or bug fix independently. After initial development and testing, the code may be merged into dev for further testing. Deploy a wip branch to test a specific new feature or bug fix during its development.
The first thing to do is update your copy of dev.
- Login to GitHub, then go to the Update Fork Tool
- Enter your username in the 'GitHub username' field and dev in the 'Branch to Update' field. Press the 'Format' button.
If your dev needs an update, you will see a blue link similar to the image below.
- Click the blue link and you will be taken to a GitHub screen.
- Press the green "Create Pull Request" button.
- Type a name for this update, then press the green "Create Pull Request" button.
- Scroll down the page of commits. In the lower right, click the "Merge Pull Request" button
- Click the green "Confirm Merge" button.
If your dev is up to date, you will see the message and star below.
If you plan to test dev, then skip the next two steps and move on to "Deploy your test website"
This step is required if your repository does not have a copy of the branch you wish to test. This is common with wip and release branches. This step is not required if you plan to test the dev branch.
- Login to GitHub and go to your cgm-remote-monitor repository.
- Switch to your dev branch
- Create a new branch based on dev, using the same name as the branch you wish to test.
Use the Update Fork Tool to update your test branch. The process is the same as above for updating your dev branch. This step is not required if you plan to test the dev branch.
Deploy your test website to Azure, Heroku, or a local install if you prefer.
Here are a couple of deployment examples.
- Deploy site to Azure, Heroku, or local, use the Mongo URI and collection from your main website. Setup the test site variables the same as your main site. This works well for testing all UI features including Care Portal with your live data.
- Deploy new site to Heroku, adding a REST upload URL to your uploader device. This keeps the website completely separate from your live Care Portal data.