Run tests after every push
The core rule of Continuous Integration is to test every single change to code. Buddy lets you easily configure a pipeline that will automatically run tests whenever a change was pushed to the repository.
Continuous Integration pipeline
First, you need to add a project and attach to it a Git repository that you want to test. Buddy features dedicated integrations with GitHub, Bitbucket, and GitLab, but you can easily add custom repositories from any server. If you wish to keep your CI/CD process in one place, you can host your projects directly on Buddy as well.
Once the project has been added and synchronized, you are ready to add your CI pipeline. If you want to test every change introduced to the repository, set the trigger mode to On push and the wildcard to
*. This way every push the repo will trigger the pipeline, regardless if it's a branch, a tag or a pull request.
You can limit the pipeline to specific refs. For example, if you want to limit it branches, the pattern will look like this:
After specifying when your pipeline should be triggered, you need to define what exactly it should do. The first action will run unit tests of your application. Buddy offers you pre-configured test environments for all popular languages and frameworks. You can also select your own Docker image in which Buddy will run the tests.
Clicking a build action will bring up its configuration details. Here you can specify the commands that will trigger the tests. The commands will be run in the context of your repository:
Buddy is very flexible when it comes to build configuration. To learn more about customizing your build, click here.
On top of the build action, you can add a notification that will send a message to your team in case the tests have failed. You can also define a second notification that will notify you once the repository is stable again. Buddy lets you send messages via e-mail or SMS, and integrates with a wide array of communication services, including Slack, Discord, and Telegram.
With the notifications added, your CI pipeline should look like this:
With Buddy, you can automate not only unit tests, but also static analysis, E2E, integration and browsers tests, Selenium, and more. All you need to do is to extend your pipeline with proper actions. For example, adding the ESLint action will run a static analysis on your code:
In addition to tests that are run after every push, pipelines can be used for code delivery or running daily tests.