tic v0.2.13.9015

Tasks Integrating Continuously: CI-Agnostic Workflow Definitions

Provides a way to describe common build and deployment workflows for R-based projects: packages, websites (e.g. blogdown, pkgdown), or data processing (e.g. research compendia). The recipe is described independent of the continuous integration tool used for processing the workflow (e.g. 'Travis CI' or 'AppVeyor').

Readme

tic

Travis-CI Build Status Build status CRAN status lifecycle

The goal of tic is to enhance and simplify working with continuous integration (CI) systems like Travis CI or AppVeyor for R projects. To learn more about CI, read this blog post and our Getting Started vignette.

The most important improvements over existing solutions are:

  1. Deployment to a Git repository is greatly simplified. Update your repository with results from the CI build.

  2. Support for R packages and other kinds of project (bookdown, blogdown, etc.), with predefined templates. Set up your project to deploy rendered versions of your book or blog with a single push to Git.

  3. Workflow specification in a single .R file, regardless of CI system used.
    Forget about .yml files or web browser configurations.

Installation

It can be installed from Github with:

# install.packages("remotes")
remotes::install_github("ropenscilabs/tic")

Setup

By calling tic::use_tic() a production ready CI setup is initialized, tailored to your specific R project. The created templates will use the providers https://travis-ci.org and https://appveyor.com. For an R package, the following steps will be set up for the CI workflow:

  • Installation of required dependencies for the project
  • Satisfying build-time dependencies of steps to be run in all CI stages
  • Running rcmdcheck::rcmdcheck()
  • Building of a pkgdown site, with deployment to the docs/ directory of the master branch
  • Running a code coverage and uploading it to codecov.io

See the Getting Started vignette for more information and links to minimal example repositories for various R projects (package, blogdown, bookdown and more).

Examples

All examples listed here work with Travis, some work with AppVeyor too. The badges link to the most recent build of the master branch.

Vignettes

Limitations

The setup functions in this package assume Git as version control system, and GitHub as platform. Automated setup works best if the project under test is located in the root of the Git repository. Multi-project repositories are not supported, see the comment by @jwijffels for guidance to work around this limitation.


ropensci_footer

Functions in tic

Name Description
step_do_push_deploy Step: Perform push deploy
run_stage Run a stage
encode_private_key Encode a private RSA key
prepare_all_stages Prepare all stages
step_build_bookdown Step: Build a bookdown book
step_add_to_known_hosts Step: Add to known hosts
reexports Objects exported from other packages
step_build_pkgdown Step: Build pkgdown documentation
step_add_to_drat Step: Add built package to a drat
stages Predefined stages
step_hello_world Step: Hello, world!
step_install_pkg Step: Install packages
step_setup_ssh Step: Setup SSH
step_install_ssh_keys Step: Install an SSH key
use_tic Initialize CI testing using tic
step_rcmdcheck Step: Check a package
step_push_deploy Step: Setup and perform push deploy
run_all_stages Emulate a CI run locally
step_test_ssh Step: Test SSH connection
TicStep The base class for all steps
get_public_key Get public RSA key
macro Macros
step_run_code Step: Run arbitrary R code
step_write_text_file Step: Write a text file
step_setup_push_deploy Step: Setup push deploy
tic-package tic: Tasks Integrating Continuously: CI-Agnostic Workflow Definitions
base64serialize Helpers for converting R objects to strings and back
ci The current CI environment
Deprecated Deprecated functions
dsl_get Storage for stages and steps
do_pkgdown Build pkgdown documentation
dsl tic's domain-specific language
repo Shortcuts for accessing CRAN-like repositories
do_bookdown Build a bookdown book
do_package_checks Add default checks for packages
No Results!

Vignettes of tic

Name
img/README.md
img/build-lifecycle.graphml
img/build-lifecycle.png
img/private-key-travis.png
img/ssh-deploy-key.png
img/tic-travis-usethis.graphml
img/tic-travis-usethis.png
img/travis-job-id.png
advanced.Rmd
advantages.Rmd
build-lifecycle.Rmd
custom-steps.Rmd
deployment.Rmd
features.Rmd
tic-travis.Rmd
tic-usethis-travis.Rmd
tic.Rmd
No Results!

Details

Type Package
License GPL (>= 2)
URL https://github.com/ropenscilabs/tic
BugReports https://github.com/ropenscilabs/tic/issues
VignetteBuilder knitr
Remotes r-lib/rcmdcheck, ropenscilabs/travis
ByteCompile No
Encoding UTF-8
LazyData TRUE
Roxygen list(markdown = TRUE)
RoxygenNote 6.1.1
Collate 'ci.R' 'appveyor.R' 'base64.R' 'dsl-storage.R' 'dsl.R' 'git2r.R' 'keys.R' 'local.R' 'macro.R' 'macro-package-checks.R' 'macro-pkgdown.R' 'macro-bookdown.R' 'mock.R' 'print.R' 'repo.R' 'run.R' 'stage.R' 'steps-base.R' 'steps-bookdown.R' 'steps-code.R' 'steps-drat.R' 'steps-git.R' 'steps-install.R' 'steps-rcmdcheck.R' 'steps-pkgdown.R' 'steps-ssh.R' 'steps-write-text-file.R' 'tic-package.R' 'travis.R' 'use_tic.R' 'utils.R'

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/tic)](http://www.rdocumentation.org/packages/tic)