Set Up Travis for Testing and Deployment
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
docs
inst/templates
man
remake
tests
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
NEWS.md
README.md
_pkgdown.yml
remake.yml
tic.R
travis.Rproj

README.md

travis

Travis-CI Build Status

The goal of travis is to simplify the setup of continuous integration with Travis CI. Apart from automating away a few button flips, it also provides an easy method to set up push access which can be then triggered (on Travis) by the companion package tic via the use_tic() function, which performs the following steps:

  1. If necessary, creates a GitHub repository
  2. Enables Travis CI for this repository
  3. Creates a default .travis.yml file
  4. Creates a default appveyor.yml file
  5. Creates a default tic.R file depending on the repo type (package, website, bookdown, ...)
  6. Enables deployment to GitHub (if necessary, depending on repo type)
  7. Helps the user create a GitHub PAT, and installs it on Travis CI

Fine-grained control is available through more specialized functions, see the examples below.

Installation

You can install travis from github with:

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

Permissions

The package is linked to the "rtravis" application, and will request GitHub permissions to carry out its actions. Revoking these permissions also invalidates any SSH keys created by this package.

Example

  1. Create a repository on GitHub (if it's not there yet)

    github_create_repo()
  2. Show the GitHub repository name

    github_repo()
  3. Turn on Travis for this repo (syncs from GitHub if necessary!)

    travis_enable()
  4. Browse the repo on Travis

    travis_browse()
  5. Set up push access for Travis: This creates an SSH key, stores it as encoded encrypted environment variable on Travis, and enables push access for the corresponding public key. GitHub notifies you via e-mail.

    use_travis_deploy()

ropensci_footer