The class repository uses continuous integration to ensure that the file you have created meets all of the requirements. If something is wrong, you will see a message stating Checks have failed. Here is what you should do:
- Review the details to see why the checks are failing.
- Click the Files changed tab at the top of the Pull Request.
- On the far right side of the file header, click the pencil icon to open the web editor.
- Make the necessary changes.
- Scroll to the bottom of the page and add the commit to your branch.
- This will kick off a new round of checks!
Help me troubleshoot
Help: My Build Failed
The class repository is using continuous integration through Travis CI to run tests on the code you have entered. To put it simply, it is checking to make sure the syntax is correct in your file.
The files we are using are very picky. If you made any mistakes, you will see a message that your build has failed. This usually means that the text you entered is incorrect. Check the syntax carefully against the instructions and edit your file as needed.
When you commit your changes, Travis CI will re-check your file.
Keep doing this until you see a message that the build has passed. If you need help, don’t forget you can @ mention
@githubteacher in your pull request.
Help With Specific Issues
The build can fail because of many reasons. By looking at the details of the Travis CI log it might help you to troubleshoot your code.
- Open the Pull request
- Go to the bottom to the “merge” icon to the section where it says ‘checks have failed’.
Here you’ll see a lot of red ‘x’s . Not good.
- Open the
The build log of Travis CI may appear a little cryptic. But with some careful reading you might be able to pull out the reason why your build is failing. (By the way, if you think the
job log is cryptic, try and click on the
The build script is a series of commands. It might be helpful to know that every new command starts with a
$ sign. Such commands can be something simple or a new (sub)script. The individual properties of your branch are tested in individual scripts. For example, Travis CI very early on tests whether your file is formatted as an appropriate “
Troubleshooting Common Issues
These are a couple of the reasons that builds can fail in this class. If your pull request is not passing and can’t be merged, double check the following things:
File Name is Incorrect
The file for the class should be in the
/_pins folder and should be named
YOUR-USERNAME.json. Double check to make sure that:
- Your file isn’t in the:
- Your file doesn’t end with:
Format of the File is Incorrect
The contents of your
.json file should look like this:
--- githubHandle: YOUR-USERNAME latitude: longitude: ---
Double check that:
- You included 3 dashes before and after your code
...or other characters.
- The spelling of
Help: Something is Wrong
This is a busy repository with a lot of contributors. If you see a different message, check the troubleshooting guide below:
|Message||What to do?|
|This branch has conflicts and cannot be merged||This message is telling you that someone has made a change to master that conflicts with the changes you made in your file. We don’t cover merge conflicts in this class so @ mention githubteacher from your Pull Request and we will help you get it resolved!|
Tell me why
When Should You Edit?
If your checks are failing or you have received comments on your pull request, you may need to make a few changes. This video will show you how: