From 6b4e3e055e78879ee7317791d686457765407d6e Mon Sep 17 00:00:00 2001 From: Liuxi Mei <liume102@student.liu.se> Date: Mon, 23 Sep 2024 14:53:39 +0200 Subject: [PATCH] update --- .gitignore | 4 ++++ .gitlab-ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d77662f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,39 @@ +image: rocker/tidyverse +stages: +- build +- test +- deploy +building: +stage: build +script: +- R -e "remotes::install_deps(dependencies = TRUE)" +- R -e 'devtools::check()' + +testing: + stage: test + allow_failure: true + when: on_success +only: + - master +coverage: '/coverage: \d+.\d+% of statements/' +script: + - Rscript -e 'install.packages("DT")' + - Rscript -e 'install.packages("covr")' + - Rscript -e 'covr::gitlab(quiet = FALSE)' +artifacts: + paths: + - public +# To produce a code coverage report as a GitLab page see +# https://about.gitlab.com/2016/11/03/publish-code-coverage-report-with-gitlab-pages/ +pages: + stage: deploy + dependencies: + - testing + script: + - ls + artifacts: + paths: + - public + expire_in: 30 days + only: + - master \ No newline at end of file -- GitLab