AzurePipelineR
Illustrate use of Azure Pipelines for R package test and MegaLinter
Install / Use
/learn @jamiegaida/AzurePipelineRREADME
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
- Ensure Azure build minutes are activated
- Add
azure-pipelines.ymlfile to root of your repository on Azure DevOps. - Add
/tests/testthatto your project substituting occurrences of the textAzurePipelineRwith your package name. This outputs test results in JUnit format to the filetest-results.xmlwhen run on linux in non-interactive mode. - Set up new pipeline
- Pipelines > Pipelines > New Pipeline > Azure Repos Git > mypackage > Existing Azure Pipelines YAML file > Path > azure-pipelines.yml
- Run pipeline
- 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.
- https://stackoverflow.com/questions/60045425/how-to-make-azure-pipeline-yml-for-ci-for-a-r-package
- https://community.rstudio.com/t/creating-an-azure-pipelines-yml-for-azure-devops-testing-packages-shiny-scripts/32471/2
- https://adinermie.com/publishing-github-super-linter-terraform-quality-checks-to-azure-devops-pipelines/
- https://github.com/r-lib/r-azure-pipelines
- https://github.com/r-lib/r-azure-pipelines/blob/master/tests/testthat.R
- https://github.com/megalinter/megalinter/issues/538#issuecomment-885602936
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
