Skip to content

Commit 33c13bb

Browse files
committed
swapping to GitHub CI
1 parent 16cf8a2 commit 33c13bb

File tree

9 files changed

+224
-82
lines changed

9 files changed

+224
-82
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ README.Rmd
88
^LICENSE\.md$
99
revdep
1010
revdep/*
11+
^\.github$

.github/workflows/R-CMD-check.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
branches:
10+
- main
11+
- master
12+
13+
name: R-CMD-check
14+
15+
jobs:
16+
R-CMD-check:
17+
runs-on: ${{ matrix.config.os }}
18+
19+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
25+
- {os: windows-latest, r: 'release'}
26+
- {os: macOS-latest, r: 'release'}
27+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
28+
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
29+
30+
env:
31+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32+
RSPM: ${{ matrix.config.rspm }}
33+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
38+
- uses: r-lib/actions/setup-r@v1
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
42+
- uses: r-lib/actions/setup-pandoc@v1
43+
44+
- name: Query dependencies
45+
run: |
46+
install.packages('remotes')
47+
install.package('BiocManager')
48+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
49+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
50+
shell: Rscript {0}
51+
52+
- name: Cache R packages
53+
if: runner.os != 'Windows'
54+
uses: actions/cache@v2
55+
with:
56+
path: ${{ env.R_LIBS_USER }}
57+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
58+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
59+
60+
- name: Install system dependencies
61+
if: runner.os == 'Linux'
62+
run: |
63+
while read -r cmd
64+
do
65+
eval sudo $cmd
66+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
67+
68+
- name: Install dependencies
69+
run: |
70+
remotes::install_deps(dependencies = TRUE)
71+
remotes::install_cran("rcmdcheck")
72+
BiocManager::install("ggtree")
73+
shell: Rscript {0}
74+
75+
- name: Check
76+
env:
77+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
78+
run: |
79+
options(crayon.enabled = TRUE)
80+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
81+
shell: Rscript {0}
82+
83+
- name: Upload check results
84+
if: failure()
85+
uses: actions/upload-artifact@main
86+
with:
87+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
88+
path: check

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Imports:
1818
ggplot2,
1919
matrixStats,
2020
patchwork
21-
RoxygenNote: 7.0.1
21+
RoxygenNote: 7.1.0
2222
Suggests: knitr,
2323
rmarkdown,
2424
ggtree,

README.Rmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ knitr::opts_chunk$set(
1818
)
1919
```
2020

21-
[![Travis-CI Build Status](https://travis-ci.org/gtonkinhill/rhierbaps.svg?branch=master)](https://travis-ci.org/gtonkinhill/rhierbaps)
21+
<!-- badges: start -->
22+
[![R-CMD-check](https://github.com/gtonkinhill/rhierbaps/workflows/R-CMD-check/badge.svg)](https://github.com/gtonkinhill/rhierbaps/actions)
23+
<!-- badges: end -->
2224

2325

2426
# rhierbaps

0 commit comments

Comments
 (0)