Skip to content

Commit 688e4a7

Browse files
authored
Merge pull request #15 from bigbio/copilot/dev-add-ci-cd-workflow
Add GitHub Actions CI/CD workflow for R ≥ 4.0 with badge
2 parents 5ece42f + f8c43c1 commit 688e4a7

5 files changed

Lines changed: 63 additions & 2 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
^.*\.Rproj$
22
^\.Rproj\.user$
3+
^\.github$

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

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master, dev]
6+
pull_request:
7+
branches: [main, master, dev]
8+
9+
name: R-CMD-check
10+
11+
permissions: read-all
12+
13+
jobs:
14+
R-CMD-check:
15+
runs-on: ${{ matrix.config.os }}
16+
17+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
config:
23+
- {os: ubuntu-latest, r: '4.0'}
24+
- {os: ubuntu-latest, r: '4.1'}
25+
- {os: ubuntu-latest, r: '4.2'}
26+
- {os: ubuntu-latest, r: '4.3'}
27+
- {os: ubuntu-latest, r: '4.4'}
28+
- {os: ubuntu-latest, r: 'release'}
29+
- {os: macOS-latest, r: 'release'}
30+
- {os: windows-latest, r: 'release'}
31+
32+
env:
33+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
34+
R_KEEP_PKG_SOURCE: yes
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: r-lib/actions/setup-pandoc@v2
40+
41+
- uses: r-lib/actions/setup-r@v2
42+
with:
43+
r-version: ${{ matrix.config.r }}
44+
use-public-rspm: true
45+
46+
- uses: r-lib/actions/setup-r-dependencies@v2
47+
with:
48+
extra-packages: any::rcmdcheck
49+
needs: check
50+
51+
- uses: r-lib/actions/check-r-package@v2
52+
with:
53+
upload-snapshots: true
54+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

DESCRIPTION

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ License: Apache 2
1313
Imports:
1414
lsr,
1515
plyr
16-
Depends:caret, kernlab, ggplot2, corrplot
16+
Depends:
17+
R (>= 4.0),
18+
caret,
19+
kernlab,
20+
ggplot2,
21+
corrplot
1722
Suggests:
1823
testthat,
1924
BiocStyle,

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[![R-CMD-check](https://github.com/bigbio/pIR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/bigbio/pIR/actions/workflows/R-CMD-check.yaml)
12
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
23

34
# [pIR](https://github.com/bigbio/pIR)

tests/testthat.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
library(testthat)
22
library(pIR)
3-
test_check("testthat")
3+
test_check("pIR")
44

0 commit comments

Comments
 (0)