generated from opensafely-core/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
297d3e9
commit 96295ca
Showing
1 changed file
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
#!/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 Python packages are as the Python image from which they are taken. | ||
python_image_version="v2" | ||
opensafely pull "python:$python_image_version" | ||
|
||
docker_python_packages=$(docker run ghcr.io/opensafely-core/python:$python_image_version python -m pip freeze) | ||
local_python_packages=$(/opt/venv/bin/python3.10 -m pip freeze) | ||
diff <(echo "$local_python_packages") <(echo "$docker_python_packages") | ||
|
||
# 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 |