2020-07-08 14:48:06 +02:00
|
|
|
# ==================================================================== #
|
|
|
|
# TITLE #
|
2020-10-08 11:16:03 +02:00
|
|
|
# Antimicrobial Resistance (AMR) Analysis for R #
|
2020-07-08 14:48:06 +02:00
|
|
|
# #
|
|
|
|
# SOURCE #
|
|
|
|
# https://github.com/msberends/AMR #
|
|
|
|
# #
|
|
|
|
# LICENCE #
|
|
|
|
# (c) 2018-2020 Berends MS, Luz CF et al. #
|
2020-10-08 11:16:03 +02:00
|
|
|
# Developed at the University of Groningen, the Netherlands, in #
|
|
|
|
# collaboration with non-profit organisations Certe Medical #
|
|
|
|
# Diagnostics & Advice, and University Medical Center Groningen. #
|
2020-07-08 14:48:06 +02:00
|
|
|
# #
|
|
|
|
# This R package is free software; you can freely use and distribute #
|
|
|
|
# it for both personal and commercial purposes under the terms of the #
|
|
|
|
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
|
|
|
# the Free Software Foundation. #
|
|
|
|
# We created this package for both routine data analysis and academic #
|
|
|
|
# research and it was publicly released in the hope that it will be #
|
|
|
|
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
2020-10-08 11:16:03 +02:00
|
|
|
# #
|
|
|
|
# Visit our website for the full manual and a complete tutorial about #
|
|
|
|
# how to conduct AMR analysis: https://msberends.github.io/AMR/ #
|
2020-07-08 14:48:06 +02:00
|
|
|
# ==================================================================== #
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- premaster
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-08-29 21:41:46 +02:00
|
|
|
schedule:
|
|
|
|
# run a schedule everyday at 3 AM.
|
|
|
|
# this is to check that all dependencies are still available (see R/zzz.R)
|
|
|
|
- cron: '0 3 * * *'
|
2020-07-08 14:48:06 +02:00
|
|
|
|
2020-07-08 20:43:25 +02:00
|
|
|
name: R-code-check
|
2020-07-08 14:48:06 +02:00
|
|
|
|
|
|
|
jobs:
|
2020-07-08 20:43:25 +02:00
|
|
|
R-code-check:
|
2020-07-08 14:48:06 +02:00
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
|
|
|
|
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
2020-10-15 09:46:41 +02:00
|
|
|
- {os: macOS-latest, r: 'devel'}
|
2020-07-08 14:48:06 +02:00
|
|
|
- {os: macOS-latest, r: 'release'}
|
2020-10-15 09:46:41 +02:00
|
|
|
- {os: macOS-latest, r: 'oldrel'}
|
2020-07-08 14:48:06 +02:00
|
|
|
- {os: windows-latest, r: 'devel'}
|
2020-10-15 09:46:41 +02:00
|
|
|
- {os: windows-latest, r: 'release'}
|
|
|
|
- {os: windows-latest, r: 'oldrel'}
|
|
|
|
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
|
|
|
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
|
|
|
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
|
|
|
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
2020-10-19 17:09:19 +02:00
|
|
|
# - {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
|
|
|
# - {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
|
2020-07-08 14:48:06 +02:00
|
|
|
|
|
|
|
env:
|
|
|
|
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
|
|
|
RSPM: ${{ matrix.config.rspm }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- uses: r-lib/actions/setup-r@master
|
|
|
|
with:
|
|
|
|
r-version: ${{ matrix.config.r }}
|
|
|
|
|
|
|
|
- uses: r-lib/actions/setup-pandoc@master
|
|
|
|
|
|
|
|
- name: Query dependencies
|
|
|
|
run: |
|
|
|
|
install.packages('remotes')
|
|
|
|
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
|
|
|
|
shell: Rscript {0}
|
|
|
|
|
|
|
|
- name: Cache R packages
|
|
|
|
if: runner.os != 'Windows'
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ${{ env.R_LIBS_USER }}
|
2020-10-15 09:46:41 +02:00
|
|
|
key: ${{ runner.os }}-r-${{ matrix.config.r }}-3-${{ hashFiles('.github/depends.Rds') }}
|
|
|
|
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-3-
|
2020-07-08 14:48:06 +02:00
|
|
|
|
|
|
|
- name: Install system dependencies
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
env:
|
|
|
|
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
|
|
|
|
run: |
|
|
|
|
Rscript -e "remotes::install_github('r-hub/sysreqs')"
|
|
|
|
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
|
|
|
|
sudo -s eval "$sysreqs"
|
|
|
|
|
2020-10-15 09:46:41 +02:00
|
|
|
- name: Install macOS dependencies
|
|
|
|
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'devel'
|
|
|
|
run: |
|
|
|
|
brew install mariadb-connector-c
|
|
|
|
|
2020-07-08 14:48:06 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
remotes::install_deps(dependencies = TRUE)
|
|
|
|
remotes::install_cran("rcmdcheck")
|
|
|
|
shell: Rscript {0}
|
|
|
|
|
|
|
|
- name: Session info
|
|
|
|
run: |
|
|
|
|
options(width = 100)
|
|
|
|
pkgs <- installed.packages()[, "Package"]
|
|
|
|
sessioninfo::session_info(pkgs, include_base = TRUE)
|
|
|
|
shell: Rscript {0}
|
|
|
|
|
|
|
|
- name: Check
|
|
|
|
env:
|
|
|
|
_R_CHECK_CRAN_INCOMING_: false
|
|
|
|
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
|
|
|
|
shell: Rscript {0}
|
|
|
|
|
|
|
|
- name: Show testthat output
|
|
|
|
if: always()
|
|
|
|
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Upload check results
|
|
|
|
if: failure()
|
2020-10-15 09:46:41 +02:00
|
|
|
uses: actions/upload-artifact@master
|
2020-07-08 14:48:06 +02:00
|
|
|
with:
|
|
|
|
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
|
|
|
|
path: check
|