fixed codecov badge #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
on: | |
push: | |
branches: [main, master, develop] | |
pull_request: | |
branches: [main, master, develop] | |
name: R-CMD-check | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
name: (${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | |
# - {os: ubuntu-latest, r: 'release'} | |
- {os: ubuntu-latest, r: '3.0'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Cache R packages | |
uses: actions/cache@v3 | |
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 R dependencies | |
run: | | |
install.packages("remotes", repos="https://cloud.r-project.org") | |
remotes::install_github("kkholst/gof") | |
remotes::install_deps(".", dep=T, upgrade=T) | |
remotes::install_cran(c("pkgdown","covr","rcmdcheck")) | |
remotes::install_bioc("Rgraphviz", upgrade="always") | |
shell: Rscript {0} | |
- name: Check | |
env: | |
_R_CHECK_FORCE_SUGGESTS_: false | |
run: | | |
options(crayon.enabled = TRUE) | |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check") | |
shell: Rscript {0} | |
- name: Webpage deployment | |
if: success() && contains('refs/heads/main', github.ref) | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' | |
- name: Code Coverage | |
if: success() && contains('refs/heads/main', github.ref) | |
run: covr::codecov(type=c("tests", "examples")) | |
shell: Rscript {0} |