stages:
  - build

build:
  stage: build
  script:
    - module load R/4.1.2-foss-2015a-bare
    - module load CDO/1.9.8-foss-2015a
    - R CMD build --resave-data .
    - R CMD check --as-cran --no-manual --run-donttest s2dv_*.tar.gz

lint-check:
  stage: build
  script:
    - module load R/4.1.2-foss-2015a-bare
    - module load CDO/1.9.8-foss-2015a
    - echo "Run lintr on the package..."
    - Rscript -e 'lintr::lint_package(path = ".")'
    - R -e 'covr::package_coverage()'
