Skip to content

Commit

Permalink
removed travis and added coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Jan 7, 2021
1 parent 1e74d68 commit 2d9b9ff
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 13 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Expand Up @@ -11,3 +11,4 @@
^examples$
^\.github$
^LICENSE\.md$
^codecov\.yml$
48 changes: 48 additions & 0 deletions .github/workflows/test-coverage.yaml
@@ -0,0 +1,48 @@
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: test-coverage

jobs:
test-coverage:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1

- uses: r-lib/actions/setup-pandoc@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion DESCRIPTION
Expand Up @@ -27,7 +27,8 @@ Suggests:
dplyr,
knitr,
scales,
rmarkdown
rmarkdown,
covr
RoxygenNote: 7.1.1
Roxygen: list(markdown = TRUE)
URL: https://github.com/dreamRs/apexcharter, https://dreamrs.github.io/apexcharter/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,9 +5,9 @@
<!-- badges: start -->
[![version](http://www.r-pkg.org/badges/version/apexcharter)](https://CRAN.R-project.org/package=apexcharter)
[![cran checks](https://cranchecks.info/badges/worst/apexcharter)](https://cranchecks.info/pkgs/apexcharter)
[![Travis build status](https://travis-ci.org/dreamRs/apexcharter.svg?branch=master)](https://travis-ci.org/dreamRs/apexcharter)
[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![R build status](https://github.com/dreamRs/apexcharter/workflows/R-CMD-check/badge.svg)](https://github.com/dreamRs/apexcharter/actions)
[![Codecov test coverage](https://codecov.io/gh/dreamRs/apexcharter/branch/master/graph/badge.svg)](https://codecov.io/gh/dreamRs/apexcharter?branch=master)
<!-- badges: end -->


Expand Down
14 changes: 14 additions & 0 deletions codecov.yml
@@ -0,0 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true

0 comments on commit 2d9b9ff

Please sign in to comment.