From 42770c75884a32087b46b7600c54c11af8718ab8 Mon Sep 17 00:00:00 2001 From: Malte Londschien Date: Mon, 4 Mar 2024 17:11:10 +0100 Subject: [PATCH] Try conda --- .github/workflows/check.yaml | 74 +++++++++++++++--------------------- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 84a9dcd8..d5f745d9 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -6,54 +6,42 @@ on: branches: - main -name: check - jobs: - check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + R-CMD-check: + name: R CMD check (${{ matrix.os }}) + runs-on: ${{ matrix.os }} 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: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - _R_CHECK_CRAN_INCOMING_: false - _R_CHECK_FORCE_SUGGESTS_: false - _R_CHECK_DOC_SIZES_: false + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-tinytex@v2 - - run: tlmgr --version - - - 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 - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - extra-packages: | - any::rcmdcheck - eth-mds/mimic-demo - eth-mds/eicu-demo - nbenn/mockthat - - - uses: r-lib/actions/check-r-package@v2 + - uses: actions/checkout@v4 + - name: Set up Conda env + uses: mamba-org/provision-with-micromamba@e2b397b12d0a38069451664382b769c9456e3d6d with: - upload-snapshots: true + cache-env: true + - name: Run R CMD check + run: | + R CMD check --as-cran --no-vignettes --no-manual . + env: + _R_CHECK_CRAN_INCOMING_: false + - name: Check for warnings + 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 \ No newline at end of file