Skip to content

Test ci.

Test ci. #75

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
R-CMD-check:
name: R CMD check (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest'] # , 'windows-latest']
steps:
- uses: actions/checkout@v4
- name: Set up Conda env
uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d
with:
cache-env: true
- name: Install TinyTex
shell: bash -l {0}
run: |
Rscript -e 'tinytex::install_tinytex(force = TRUE)'
- name: Install demo datasets
shell: bash -l {0}
run: |
Rscript -e 'install.packages(c("mimic.demo", "eicu.demo"), repos="https://eth-mds.github.io/physionet-demo")'
- name: Run R CMD check
shell: bash -l {0}
run: |
R CMD build . && R CMD check --as-cran $(ls -t . | head -n1)
env:
_R_CHECK_CRAN_INCOMING_: false
- name: Check for warnings
shell: bash -l {0}
run: |
CHECK_LOG_FILE=ricu.Rcheck/00check.log
CHECK_INSTALL_FILE=ricu.Rcheck/00install.out
if ! [[ -f "$CHECK_LOG_FILE" ]]; then
echo "Log-file not found."
exit 1
fi
if cat $CHECK_LOG_FILE | grep -q "ERROR"; then
cat $CHECK_INSTALL_FILE
cat $CHECK_LOG_FILE
exit 1
fi
if cat $CHECK_LOG_FILE | grep -q "WARNING"; then
echo "Found warnings, treated as errors."
cat $CHECK_LOG_FILE
exit 1
fi