-
Notifications
You must be signed in to change notification settings - Fork 15
Tutorial 1: Your first commit
Adam Hope edited this page Nov 20, 2019
·
5 revisions
Everyone on the team should complete this exercise as soon as they have access to the team repo.
- Set up the project: Installation Instructions
- Git pull to get the latest code
git pull --rebase
read this if you're not sure what--rebase
does - In the
client/src/js/pages/teamPage
folder, 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-commit
(OS X)
npm -s run test
(Windows)
This 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
- Fix any merge conflicts
- Run
./go pre-commit
(OS X)npm -s run test
(Windows) - Repeat steps 2-5 until all tests have passed and all conflicts have been resolved
- Run
git add -p
to 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
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