diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8796bb1..62d332c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,8 +80,6 @@ jobs: # See https://github.com/jqlang/jq/issues/1571 run: | devcontainer_image=$(grep -v "//" .devcontainer/devcontainer.json | jq --raw-output .image) - echo "$devcontainer_image" - echo "$PUBLIC_IMAGE_NAME:$IMAGE_VERSION" test "$devcontainer_image" = "$PUBLIC_IMAGE_NAME:$IMAGE_VERSION" - name: Build and run dev container task diff --git a/tests/dev_container.sh b/tests/dev_container.sh index 6fe6971..63e6957 100755 --- a/tests/dev_container.sh +++ b/tests/dev_container.sh @@ -7,6 +7,13 @@ set -euxo pipefail # Check the OpenSAFELY research-template example runs. opensafely run run_all +# Check the R packages. +opensafely_r_packages=$(curl -s https://raw.githubusercontent.com/opensafely-core/r-docker/main/renv.lock | + jq '.Packages | keys') +r_installed=$(Rscript -e 'installed_packages <- as.data.frame(installed.packages()[,c(1,3:4)])' \ + -e 'package_names<-unique(installed_packages[installed_packages$Priority!="base"|is.na(installed_packages$Priority),,drop=FALSE][["Package"]])' + -e 'cat(package_names[! package_names %in% c("docopt","spatial","littler")],sep="\n")') + # Check the Python packages are as the Python image from which they are taken. python_image_version="v2" opensafely pull "python:$python_image_version"