Commit a9d5af52 authored by Andrew Collier's avatar Andrew Collier
Browse files

Add GitLab CI YAML

parents
Pipeline #236089015 passed with stage
in 1 minute and 29 seconds
image: rocker/tidyverse:4.0.3
services:
- mongo:latest
before_script:
- R -e "install.packages('mongolite')"
test:
script:
- Rscript test-mongo.R
library(mongolite)
db <- mongo(url = "mongodb://mongo")
# Wipe existing data.
#
if(db$count() > 0) db$drop()
# Insert data.
#
db$insert(mtcars)
stopifnot(db$count() == nrow(mtcars))
# Query data.
#
cars <- db$find()
stopifnot(all.equal(cars, mtcars))
db$drop()
rm(db)
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment