Skip to content

Commit

Permalink
Add CI tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ShixiangWang committed Sep 1, 2019
1 parent 04833df commit e2c7682
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
^README\.Rmd$
^\.github$
^CODE_OF_CONDUCT\.md$
^appveyor\.yml$
^\.travis\.yml$
^codecov\.yml$
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
cache: packages
after_success:
- Rscript -e 'covr::codecov()'
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 6.1.1
Suggests:
spelling
spelling,
testthat,
covr
Language: en-US
3 changes: 3 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ knitr::opts_chunk$set(

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/ShixiangWang/yq?branch=master&svg=true)](https://ci.appveyor.com/project/ShixiangWang/yq)
[![Travis build status](https://travis-ci.org/ShixiangWang/yq.svg?branch=master)](https://travis-ci.org/ShixiangWang/yq)
[![Codecov test coverage](https://codecov.io/gh/ShixiangWang/yq/branch/master/graph/badge.svg)](https://codecov.io/gh/ShixiangWang/yq?branch=master)
<!-- badges: end -->


Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![AppVeyor build
status](https://ci.appveyor.com/api/projects/status/github/ShixiangWang/yq?branch=master&svg=true)](https://ci.appveyor.com/project/ShixiangWang/yq)
[![Travis build
status](https://travis-ci.org/ShixiangWang/yq.svg?branch=master)](https://travis-ci.org/ShixiangWang/yq)
[![Codecov test
coverage](https://codecov.io/gh/ShixiangWang/yq/branch/master/graph/badge.svg)](https://codecov.io/gh/ShixiangWang/yq?branch=master)
<!-- badges: end -->

## Installation
Expand Down
52 changes: 52 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# DO NOT CHANGE the "init" and "install" sections below

# Download script file from GitHub
init:
ps: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'
install:
ps: Bootstrap

cache:
- C:\RLibrary

environment:
NOT_CRAN: true
# env vars that may need to be set, at least temporarily, from time to time
# see https://github.com/krlmlr/r-appveyor#readme for details
# USE_RTOOLS: true
# R_REMOTES_STANDALONE: true

# Adapt as necessary starting from here

build_script:
- travis-tool.sh install_deps

test_script:
- travis-tool.sh run_tests

on_failure:
- 7z a failure.zip *.Rcheck\*
- appveyor PushArtifact failure.zip

artifacts:
- path: '*.Rcheck\**\*.log'
name: Logs

- path: '*.Rcheck\**\*.out'
name: Logs

- path: '*.Rcheck\**\*.fail'
name: Logs

- path: '*.Rcheck\**\*.Rout'
name: Logs

- path: '\*_*.tar.gz'
name: Bits

- path: '\*_*.zip'
name: Bits
12 changes: 12 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: auto
threshold: 1%
4 changes: 4 additions & 0 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
library(testthat)
library(yq)

test_check("yq")

0 comments on commit e2c7682

Please sign in to comment.