AMR/.gitlab-ci.yml

70 lines
2.0 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 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:40:40 +01:00
dependencies:
- setup
when: on_success
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