Skip to content

Commit

Permalink
Adding CI with GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlicenJoyHenning committed Aug 13, 2024
1 parent e87e81f commit a219d26
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 38 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
^README\.md$
^LICENSE\.md$
^vignettes$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
82 changes: 44 additions & 38 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,51 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

on: [push, pull_request]
permissions: read-all

jobs:
R-CMD-check:
runs-on: ubuntu-latest
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up R
uses: r-lib/actions/setup-r@v2

- name: Install system dependencies
run: |
sudo apt-get install -y libmagick++-dev
- name: Check internet connection
run: |
ping -c 3 cran.r-project.org
- name: Install R package dependencies
run: |
install.packages('devtools')
install.packages('remotes')
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Retry installing devtools if failed
if: failure()
run: |
install.packages('devtools')
shell: Rscript {0}

- name: Install DropletQC from GitHub
run: |
devtools::install_github("powellgenomicslab/DropletQC")
shell: Rscript {0}

- name: Check package
run: |
R CMD check --no-manual --as-cran
shell: Rscript {0}
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- name: Install CRAN and GitHub dependencies
run: |
install.packages('devtools')
devtools::install_github('powellgenomicslab/DropletQC')
devtools::install_deps(dependencies = TRUE)
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

0 comments on commit a219d26

Please sign in to comment.