Skip to content

install system dependencies #2 #15

install system dependencies #2

install system dependencies #2 #15

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: CI
jobs:
R-CMD-check:
runs-on: ubuntu-latest
strategy:
matrix:
r: ['4.1']
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: ${{ matrix.r }}
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get -y install libcurl4-openssl-dev libssl-dev make zlib1g-dev libglpk-dev libxml2-dev pandoc libpng-dev python3 libicu-dev
- name: Cache renv library
uses: actions/cache@v3
with:
path: ~/.cache/R/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Install R package dependencies
run: |
install.packages("renv")
renv::restore()
shell: Rscript {0}
- name: Install check tools
run: |
renv::install(c("rcmdcheck", "covr"))
shell: Rscript {0}
- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
shell: Rscript {0}
- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package