Skip to content

Commit

Permalink
WIP script
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMaude committed May 9, 2024
1 parent 42100c8 commit e98d740
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion tests/dev_container.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
#!/bin/sh
#!/bin/bash

set -euxo pipefail

# Check that we are the rstudio user.
[ "$(whoami)" == "rstudio" ]

# Check the OpenSAFELY research-template example runs.
opensafely run run_all

# Check the number of R packages.

# Check the number of Python packages.
docker_python_package_count=$(curl "https://raw.githubusercontent.com/opensafely-core/python-docker/main/v2/requirements.txt" | \
awk 'BEGIN {package_count=0} !/^wheel/ && /==/ {package_count++} END {print package_count}')
local_python_package_count=$(/opt/venv/bin/python3.10 -m pip freeze | wc -l)
(( local_python_package_count == docker_python_package_count ))

# Check the RStudio server is running.
curl -L http://localhost:8787 | grep "RStudio"

# Check the RStudio server installation
sudo rstudio-server stop
sudo rstudio-server verify-installation

0 comments on commit e98d740

Please sign in to comment.