AMR/.gitlab-ci.yml

74 lines
2.1 KiB
YAML
Raw Normal View History

2018-12-30 08:40:40 +01:00
# ==================================================================== #
# TITLE #
# Antimicrobial Resistance (AMR) Analysis #
# #
# AUTHORS #
# Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) #
# #
# LICENCE #
# This package is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License version 2.0, #
# as published by the Free Software Foundation. #
# #
# This R package is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License version 2.0 for more details. #
# ==================================================================== #
# https://r-posts.com/gitlab-ci-for-r-package-development/
image: rocker/r-base
2018-12-30 08:48:35 +01:00
before_script:
- apt-get update
# install dependencies for package
- apt-get -y install libxml2-dev libssl-dev libcurl4-openssl-dev zlib1g-dev
2018-12-30 07:44:11 +01:00
stages:
2018-12-30 08:40:40 +01:00
- setup
- test
2018-12-30 07:44:11 +01:00
- deploy
2018-12-30 08:40:40 +01:00
cache:
# Ommit key to use the same cache across all pipelines and branches
key: "$CI_COMMIT_REF_SLUG"
paths:
- packrat/lib/
2018-12-30 07:44:11 +01:00
2018-12-30 08:40:40 +01:00
setup:
stage: setup
script:
- R -e 'source("ci.R"); ci_setup()'
2018-12-30 07:44:11 +01:00
2018-12-30 08:40:40 +01:00
check:
stage: test
dependencies:
- setup
when: on_success
script:
- R -e 'source("ci.R"); ci_check()'
coverage:
stage: test
dependencies:
- setup
when: on_success
only:
- master
2018-12-30 07:44:11 +01:00
script:
2018-12-30 08:40:40 +01:00
- R -e 'source("ci.R"); ci_coverage()'
2018-12-30 07:44:11 +01:00
coverage: '/Code coverage: \d+\.\d+/'
2018-12-24 12:12:05 +01:00
2018-12-24 13:21:47 +01:00
pages:
2018-12-30 07:44:11 +01:00
stage: deploy
2018-12-30 08:42:06 +01:00
dependencies:
2018-12-30 08:40:40 +01:00
- setup
2018-12-30 10:07:39 +01:00
when: always
2018-12-30 08:40:40 +01:00
only:
- master
2018-12-24 12:12:05 +01:00
script:
2018-12-30 08:40:40 +01:00
- R -e 'source("ci.R"); ci_pages()'
2018-12-24 12:12:05 +01:00
artifacts:
paths:
- public