Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a user I would like the gitlab-ci.yml template to be up-to-date #112

Closed
3 tasks done
ALanguillaume opened this issue Mar 13, 2024 · 0 comments · Fixed by #120
Closed
3 tasks done

As a user I would like the gitlab-ci.yml template to be up-to-date #112

ALanguillaume opened this issue Mar 13, 2024 · 0 comments · Fixed by #120

Comments

@ALanguillaume
Copy link
Contributor

ALanguillaume commented Mar 13, 2024

  • The REPO_NAME variable is not set as a global variable
  • {pak} is used instead of remotes
  • A between job cache is used ? cf infra
image: rocker/verse:latest

variables:
  GIT_DEPTH: 10
  REPO_NAME: "https://packagemanager.rstudio.com/all/__linux__/focal/latest"
  R_LIBS_USER: "ci/lib"

cache:
  # key: global-cache
  paths:
    - ${R_LIBS_USER}

stages:
  - install
  - check

install:
  stage: install
  script:
    - lsb_release -c
    - R -e "sessionInfo()"
    - if [[ $CI_DEFAULT_BRANCH == "master" || $CI_DEFAULT_BRANCH = "main" ]]; then echo "OK - Default branch is master or main"; else echo "Default branch is not master or main; please add yours ($CI_DEFAULT_BRANCH) where needed, as well as in the present line of code" ; exit 1; fi
    - apt-get update -qq && apt-get install -y libharfbuzz-dev libfribidi-dev
    - echo "Library path for packages :" $R_LIBS_USER
    - mkdir -p $R_LIBS_USER
    - Rscript -e 'install.packages("remotes")'
    - Rscript -e 'install.packages("rcmdcheck")'
    - Rscript -e 'remotes::install_local(upgrade = "always")'
  cache:
    key: ${CI_COMMIT_REF_SLUG}-dependencies
    paths:
      - ${R_LIBS_USER}
  artifacts:
    paths:
      - install
    expire_in: 30 days

check:
  stage: check
  script:
    - R -e 'rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")'
  cache:
    key: ${CI_COMMIT_REF_SLUG}-dependencies
    paths:
      - ${R_LIBS_USER}
  artifacts:
    paths:
      - check
    expire_in: 30 days


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants