EHDEN / Trajectories

5 stars 2 forks source link

[IMPROVEMENT] Continuous Integration (CI) Services #34

Open smusali opened 1 year ago

smusali commented 1 year ago
  1. Understanding Continuous Integration (CI): CI is a development practice where developers frequently integrate their changes into a shared repository, preferably several times daily. Each integration is then automatically verified by building the application and running tests. This approach allows teams to detect problems early and locate them more easily.
  2. Selection of CI Services: Several CI services are available, each with strengths. Examples include GitHub Actions, Travis CI, GitLab CI, Jenkins, and AppVeyor. The choice depends on your specific needs and the environment your project is hosted in. For example, if your code is hosted on GitHub, GitHub Actions might be a good choice as it is directly integrated with the platform.
  3. Configuring CI Services: CI services are typically configured through a file in your repository. In this file, you can define multiple workflows or jobs, each with a series of steps to execute. These steps include checking out your code, setting up an R environment, installing dependencies, building your package, and running your tests.
  4. CI Across Different Platforms: One of the main benefits of CI services is the ability to run your tests on multiple platforms. This is especially important for R packages, which are expected to work on Windows, macOS, and various Linux distributions. By configuring your CI service to run your tests on all these platforms, you can catch platform-specific issues you might not otherwise notice.
  5. CI with Different Versions of R: It's also a good idea to test your package with multiple versions of R. This could include the current release, the development version, and possibly older versions that you still want to support. This will help ensure that your package works for all users, regardless of which version of R they're using.
  6. Automatic Checks with CI: CI can perform other checks automatically. For example, you could use it to check that your documentation is current, your code adheres to a certain style guide, or your package can be correctly built and installed.
  7. CI as a Gatekeeper: A powerful feature of CI is that it can act as a gatekeeper. You can configure your repository so that changes cannot be merged unless all CI checks pass. This helps prevent the introduction of errors and ensures that all changes have been appropriately tested.