Skip to content

Illustrate use of Azure Pipelines for R package test and MegaLinter

Notifications You must be signed in to change notification settings

jamiegaida/AzurePipelineR

Repository files navigation

AzurePipelineR

Motivation

Make it easy to use Azure DevOps Pipelines to check, test, and lint R packages by providing a 'drop in' yaml file and simple instructions.

Typical usage

Pull requests are set up to trigger a pipeline run. The pipeline lints the code using MegaLinter and lintr, and checks the package using rcmdcheck::rcmdcheck(). Unit tests are run with testthat during rcmdcheck. Code coverage is evaluated by covr::azure()

Reporting

Linting, checking, testing, and code coverage results are available for review on the Azure pipeline.

Details

The files azure-pipelines.yml and /tests/testthat are the core of this repository. The actual package contains only one toy function hello().

Set-up

  1. Ensure Azure build minutes are activated
  2. Add azure-pipelines.yml file to root of your repository on Azure DevOps.
  3. Add /tests/testthat to your project substituting occurrences of the text AzurePipelineR with your package name. This outputs test results in JUnit format to the file test-results.xml when run on linux in non-interactive mode.
  4. Set up new pipeline
    1. Pipelines > Pipelines > New Pipeline > Azure Repos Git > mypackage > Existing Azure Pipelines YAML file > Path > azure-pipelines.yml
  5. Run pipeline
  6. Set up branch policies to run pipeline for pull requests using these instructions

Acknowledgement

This pipeline was pieced together from numerous sources that are gratefully acknowledged.

About

Illustrate use of Azure Pipelines for R package test and MegaLinter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages