-
Notifications
You must be signed in to change notification settings - Fork 3
Tutorial 1: Your first commit
Everyone on the team should complete this exercise as soon as they have access to the team repo.
- Check you have access to the repo via gitpod: Setup Instructions
- Git pull to get the latest code
git pull --rebase --autostash(read this if you're not sure what--rebasedoes) - In the
/client/src/js/pages/teamPagefolder, there will be a file calledteamPage.spec.js. - Add a test that checks for your name in the describe template tests. (The code should look similar to this)
describe('#render', () => {
it('should render my team page', () => {
const page = new TeamPage();
expect(page.render()).toContain("<h1>Made by:</h1>");
});
it('should contain team members names', () => {
const page = new TeamPage();
expect(page.render()).toContain("Sheila");
expect(page.render()).toContain("Bruce");
});
});- Run
./go pre-commitThis will run the pre-commit checks - something should fail. - Fix the failing test by adding your name and your pairs name to the team page in
client/src/pages/teamPage/teamPage.hbs - Run the tests again
./go test– everything should pass.
- Check the CI build (see below), do not pull unless it's green!
- Run
git pull --rebase --autostash - Fix any merge conflicts
- Run
./go pre-commit - Repeat steps 2-5 until all tests have passed and all conflicts have been resolved
- Run
git add -pto add your changes. - Run
git commit -m "[COMMIT MESSAGE]your commit message in the following format
git commit -m "[name 1/name 2][#0] {verb here} {what your commit does here}"
e.g.
git commit -m "[Bruce/Sheila][#0] Add names Bruce and Sheila to team page"
- Git pull to get the latest changes
git pull --rebase ./go pre-commit- Push your changes
git push origin master
If you see a 403 error when you push, try this work around

Click on the icon on the top right corner and navigate to Open Access Control

Allow Gitpod to write to your public repos. This is needed because Gitpod needs to talk to
Github to commit your code to the shared repo. If you ever want to use Gitpod on your own private repo
you will then need to also allow write access to private repos. This isn't needed for LevelUp though

To view the build status and get notifications about the build status:
Add the following XML config to CCTray or CCMenu on your dev machine
https://circleci.com/gh/twlevelup/watch_edition.cc.xml
You can also access the CI server and view the status of the build here Circle CI