2020-07-08 14:48:06 +02:00
|
|
|
# ==================================================================== #
|
|
|
|
# TITLE #
|
2021-02-02 23:57:35 +01:00
|
|
|
# Antimicrobial Resistance (AMR) Data Analysis for R #
|
2020-07-08 14:48:06 +02:00
|
|
|
# #
|
|
|
|
# SOURCE #
|
|
|
|
# https://github.com/msberends/AMR #
|
|
|
|
# #
|
|
|
|
# LICENCE #
|
2020-12-27 00:30:28 +01:00
|
|
|
# (c) 2018-2021 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 #
|
2021-02-02 23:57:35 +01:00
|
|
|
# how to conduct AMR data analysis: https://msberends.github.io/AMR/ #
|
2020-07-08 14:48:06 +02:00
|
|
|
# ==================================================================== #
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-09-29 16:36:03 +02:00
|
|
|
- development
|
|
|
|
- main
|
2020-07-08 14:48:06 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-09-29 16:36:03 +02:00
|
|
|
- main
|
2020-08-29 21:41:46 +02:00
|
|
|
schedule:
|
2021-06-04 21:07:55 +02:00
|
|
|
# run a schedule everyday at 1 AM.
|
2020-08-29 21:41:46 +02:00
|
|
|
# this is to check that all dependencies are still available (see R/zzz.R)
|
2021-06-04 21:07:55 +02:00
|
|
|
- cron: '0 1 * * *'
|
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 }}
|
2020-10-26 15:53:31 +01:00
|
|
|
|
|
|
|
continue-on-error: ${{ matrix.config.allowfail }}
|
2020-07-08 14:48:06 +02:00
|
|
|
|
2020-10-26 15:53:31 +01:00
|
|
|
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }})
|
2020-07-08 14:48:06 +02:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
2021-08-31 17:06:44 +02:00
|
|
|
# test all systems against all released versions of R >= 3.0, we support them all!
|
|
|
|
- {os: macOS-latest, r: 'devel', allowfail: true}
|
|
|
|
- {os: macOS-latest, r: '4.1', allowfail: false}
|
|
|
|
- {os: macOS-latest, r: '4.0', allowfail: false}
|
|
|
|
- {os: macOS-latest, r: '3.6', allowfail: false}
|
|
|
|
- {os: macOS-latest, r: '3.5', allowfail: false}
|
|
|
|
- {os: macOS-latest, r: '3.4', allowfail: false}
|
|
|
|
- {os: macOS-latest, r: '3.3', allowfail: false}
|
|
|
|
- {os: macOS-latest, r: '3.2', allowfail: false}
|
|
|
|
- {os: ubuntu-20.04, r: 'devel', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '4.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '4.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '3.6', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '3.5', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '3.4', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '3.3', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '3.2', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '3.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: ubuntu-20.04, r: '3.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
|
|
|
|
- {os: windows-latest, r: 'devel', allowfail: true}
|
2021-06-15 10:51:04 +02:00
|
|
|
- {os: windows-latest, r: '4.1', allowfail: false}
|
|
|
|
- {os: windows-latest, r: '4.0', allowfail: false}
|
2021-08-16 21:54:34 +02:00
|
|
|
- {os: windows-latest, r: '3.6', allowfail: false}
|
2021-06-15 10:51:04 +02:00
|
|
|
- {os: windows-latest, r: '3.5', allowfail: false}
|
|
|
|
- {os: windows-latest, r: '3.4', allowfail: false}
|
|
|
|
- {os: windows-latest, r: '3.3', allowfail: false}
|
|
|
|
- {os: windows-latest, r: '3.2', allowfail: false}
|
2021-05-15 21:36:22 +02:00
|
|
|
|
2020-07-08 14:48:06 +02:00
|
|
|
env:
|
2021-09-29 20:24:02 +02:00
|
|
|
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
|
2020-07-08 14:48:06 +02:00
|
|
|
RSPM: ${{ matrix.config.rspm }}
|
2021-05-30 22:14:38 +02:00
|
|
|
R_REPOSITORIES: "https://cran.rstudio.com"
|
2021-09-29 16:36:03 +02:00
|
|
|
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
R_KEEP_PKG_SOURCE: yes
|
2021-09-29 20:10:44 +02:00
|
|
|
|
2020-07-08 14:48:06 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2021-09-29 16:36:03 +02:00
|
|
|
- uses: r-lib/actions/setup-pandoc@v1
|
|
|
|
|
2021-05-16 09:25:36 +02:00
|
|
|
- uses: r-lib/actions/setup-r@v1
|
2020-07-08 14:48:06 +02:00
|
|
|
with:
|
|
|
|
r-version: ${{ matrix.config.r }}
|
2021-09-29 16:36:03 +02:00
|
|
|
http-user-agent: ${{ matrix.config.http-user-agent }}
|
|
|
|
use-public-rspm: true
|
|
|
|
|
2021-09-29 20:10:44 +02:00
|
|
|
- name: show file list
|
|
|
|
run: ls -lh
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
if: always()
|
|
|
|
run: |
|
2021-09-29 20:24:02 +02:00
|
|
|
install.packages("remotes", repos = c("https://cloud.r-project.org", "https://cran.rstudio.com"))
|
2021-09-29 20:10:44 +02:00
|
|
|
remotes::install_local("data-raw/AMR_latest.tar.gz", dependencies = TRUE)
|
2021-09-29 20:13:52 +02:00
|
|
|
shell: Rscript {0}
|
2021-09-29 20:10:44 +02:00
|
|
|
|
2021-05-16 09:25:36 +02:00
|
|
|
- name: Show session info
|
2021-05-20 10:10:40 +02:00
|
|
|
if: always()
|
2020-07-08 14:48:06 +02:00
|
|
|
run: |
|
|
|
|
options(width = 100)
|
2020-12-29 21:23:01 +01:00
|
|
|
utils::sessionInfo()
|
|
|
|
as.data.frame(utils::installed.packages())[, "Version", drop = FALSE]
|
2020-07-08 14:48:06 +02:00
|
|
|
shell: Rscript {0}
|
2021-09-29 16:36:03 +02:00
|
|
|
|
|
|
|
- uses: r-lib/actions/check-r-package@v1
|
2021-09-29 16:43:05 +02:00
|
|
|
env:
|
2021-09-29 20:10:44 +02:00
|
|
|
_R_CHECK_CRAN_INCOMING_: false
|
|
|
|
_R_CHECK_FORCE_SUGGESTS_: false
|
|
|
|
_R_CHECK_DEPENDS_ONLY_: true
|
|
|
|
_R_CHECK_LENGTH_1_CONDITION_: verbose
|
|
|
|
_R_CHECK_LENGTH_1_LOGIC2_: verbose
|
|
|
|
R_RUN_TINYTEST: true
|
2021-09-29 16:43:05 +02:00
|
|
|
# during 'R CMD check', R_LIBS_USER will be overwritten, so:
|
|
|
|
R_LIBS_USER_GH_ACTIONS: ${{ env.R_LIBS_USER }}
|
|
|
|
|
2021-05-15 22:30:11 +02:00
|
|
|
- name: Show unit tests output
|
2020-07-08 14:48:06 +02:00
|
|
|
if: always()
|
2021-09-29 16:36:03 +02:00
|
|
|
run: find check -name 'tinytest.Rout*' -exec cat '{}' \; || true
|
2020-07-08 14:48:06 +02:00
|
|
|
shell: bash
|
|
|
|
|
2021-09-29 16:36:03 +02:00
|
|
|
- name: Upload check results
|
2021-05-16 09:25:36 +02:00
|
|
|
if: always()
|
2021-09-29 16:36:03 +02:00
|
|
|
uses: actions/upload-artifact@main
|
2020-07-08 14:48:06 +02:00
|
|
|
with:
|
2021-08-29 23:50:45 +02:00
|
|
|
name: ${{ matrix.config.os }}-r-${{ matrix.config.r }}-artifacts
|
2021-09-29 16:36:03 +02:00
|
|
|
path: check
|