Skip to content

Commit

Permalink
Try conda
Browse files Browse the repository at this point in the history
  • Loading branch information
mlondschien committed Mar 4, 2024
1 parent 8c38355 commit 42770c7
Showing 1 changed file with 31 additions and 43 deletions.
74 changes: 31 additions & 43 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 42770c7

Please sign in to comment.