Welcome
opened this issue · comments
Welcome
In this repository, we'll be diving into the world of Continuous Integration. Continuous Integration, or CI, can benefit your projects and change how you work on GitHub. If you're new to Continuous Integration, you may be thinking, "What exactly is it, and do I need it in my project?"
What is CI? Why should you care?
CI can help you stick to your team’s quality standards by running tests and reporting the results on GitHub. CI tools run builds and tests, triggered by commits. The results post back to GitHub in the pull request. This reduces context switching for developers, and improves consistency for testing. The goal is fewer bugs in production and faster feedback while developing.
There are several CI providers that integrate with GitHub. You can find some examples in the GitHub Marketplace. With so many options, you can pick the best tool for the job.
The following diagram shows the relative percentage of the top 10 CI tools used with GitHub.com.
Our analysis also shows that many repositories use more than one CI service. This allows individuals within teams to use their favorites, instead of feeling stuck on one option.
The tools that will work best for your project depend on many factors, including:
- Programming language and application architecture
- Operating system and browsers you plan to support
- Your team’s experience and skills
- Scaling capabilities and plans for growth
- Geographic distribution of dependent systems and the people who use them
- Packaging and delivery goals
Step 1: Enable Continuous Integration
Ready to see how CI can fit into your workflow? Let's install CircleCI, and start our very first CI build!
Note: When you integrate with other services, private repositories may have additional costs. You can change the publicity of your repository in the Settings on GitHub.
⌨️ Activity: Enable CircleCI on this repository
- Navigate to CircleCI's sign in page in a separate tab.
- Sign in with GitHub and set up a build on CircleCI for this repository. You will need to add this project, and 'start building'.
- You can find step by step instructions in CircleCI's documentation.
I'll respond below for your next step
Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.
Great work enabling CI on your repository!
What's a build?
Every time you push code, your CI service clones your repository to a virtual environment. It installs necessary dependencies, compiles your code, and runs tests. If everything goes well, the "build" is successful. Sometimes, your build will fail the test, giving you valuable feedback to diagnose the issue.
Build failure
Now that the integration is enabled, you might have noticed that the build failed.
Our build failed because it was missing key information -- we currently don't have a configuration file in our project. A configuration file is necessary for our CI to look for tests to run. Once we create this file, we'll generate a successful build.
Note: You may notice email notifications from the integration. To change the settings, see CircleCI's documentation on notifications.
Step 2: Introduce the configuration file
On GitHub, let's add a configuration file to our project to generate a successful build. I already created a branch and committed the configuration file. Next, you'll need to open up a pull request.
⌨️ Activity: Configure the integration with a special file
- Create a new pull request using
base: master
andcompare: initial-circle-config
I'll respond in your pull request with the next step.
Sometimes I respond too fast for the page to update! If you perform an expected action and don't see a response, wait a few seconds and refresh the page for your next steps.