From 3fa7c41700d4e0f721a087b8f2c75fd4efc48251 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Tue, 10 Sep 2019 10:34:31 -0500 Subject: [PATCH] use_azure_pipelines() --- .Rbuildignore | 1 + README.md | 3 +++ azure-pipelines.yml | 12 ++++++++++++ tests/testthat.R | 6 +++++- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 azure-pipelines.yml diff --git a/.Rbuildignore b/.Rbuildignore index 9b2f4f7f0..d8451b2d1 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -14,3 +14,4 @@ ^\.github$ ^pkgdown$ ^\.covrignore$ +^azure-pipelines\.yml$ diff --git a/README.md b/README.md index dfce6608e..9140d23f7 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,9 @@ [![CRAN status](https://www.r-pkg.org/badges/version/roxygen2)](https://CRAN.R-project.org/package=roxygen2) [![Travis build status](https://travis-ci.org/r-lib/roxygen2.svg?branch=master)](https://travis-ci.org/r-lib/roxygen2) [![Codecov test coverage](https://codecov.io/gh/r-lib/roxygen2/branch/master/graph/badge.svg)](https://codecov.io/gh/r-lib/roxygen2?branch=master) +[![Azure pipelines build status](https://img.shields.io/azure-devops/build/r-lib/roxygen2/2)](https://dev.azure.com/r-lib/roxygen2/_build/latest?definitionId=1&branchName=master) +[![Azure pipelines test status](https://img.shields.io/azure-devops/tests/r-lib/roxygen2/2?color=brightgreen&compact_message)](https://dev.azure.com/r-lib/roxygen2/_build/latest?definitionId=1&branchName=master) +[![Azure pipelines coverage status](https://img.shields.io/azure-devops/coverage/r-lib/roxygen2/2)](https://dev.azure.com/r-lib/roxygen2/_build/latest?definitionId=1&branchName=master) The premise of roxygen2 is simple: describe your functions in comments next to their definitions and roxygen2 will process your source code and comments to automatically generate `.Rd` files in `man/`, `NAMESPACE`, and, if needed, the `Collate` field in `DESCRIPTION`. diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..3c9c782a8 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,12 @@ +# R package +# Test an R package + +resources: + repositories: + - repository: r-azure-pipelines + type: github + name: r-lib/r-azure-pipelines + endpoint: r-lib + +jobs: + - template: azure-tidyverse.yml@r-azure-pipelines diff --git a/tests/testthat.R b/tests/testthat.R index 016f50fed..b7034ef09 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,4 +1,8 @@ library(testthat) library(roxygen2) -test_check("roxygen2") +if (requireNamespace("xml2")) { + test_check("roxygen2", reporter = MultiReporter$new(reporters = list(JunitReporter$new(file = "test-results.xml"), CheckReporter$new()))) +} else { + test_check("roxygen2") +}