This PR adds a Docker set up to run integration tests for LORIS-MRI.
The image files are the followings:
test/db.Dockerfile. This file defines how to create the LORIS-MRI database. It is a copy of LORIS core Dockerfile.test.db with the added SQL of LORIS-MRI.
test/mri.Dockerfile. This file defines how to build LORIS-MRI. It downloads and installs LORIS-MRI dependencies (DICOM & MINC toolkits, Perl & Python librarires...), copies the LORIS-MRI code, sets up the filesystem, initiates the environment variables...
test/docker-compose.yml. This file defines how to put together the two previous images.
The installation files are the following:
install/install_database.sql. SQL extracted from install/imaging_install.sh. It is now called by this file and the database image.
test/imaging_install_test.sh. This part is not final yet (we need to see how to integrate this with the S3 bucket). This is a copy of install/imaging_install.sh that sets up the appropriate file structure for LORIS-MRI. There are many differences in the environment (users, files...) so I don't think we can avoid the duplication here.
The GitHub Actions are the following:
.github/workflows/integration.yml. It builds the Docker images and run the integration tests in these images (there is only a mock up test for now). Since the image layers are cached in the GitHub Actions Cache, they can be built regularly in a relatively quick manner.
Another notable change is that except for building the database, the tests no longer depend on LORIS core. That is, we notably do not depend on PHP or LORIS core integration tests.
This PR adds a Docker set up to run integration tests for LORIS-MRI.
The image files are the followings:
test/db.Dockerfile
. This file defines how to create the LORIS-MRI database. It is a copy of LORIS coreDockerfile.test.db
with the added SQL of LORIS-MRI.test/mri.Dockerfile
. This file defines how to build LORIS-MRI. It downloads and installs LORIS-MRI dependencies (DICOM & MINC toolkits, Perl & Python librarires...), copies the LORIS-MRI code, sets up the filesystem, initiates the environment variables...test/docker-compose.yml
. This file defines how to put together the two previous images.The installation files are the following:
install/install_database.sql
. SQL extracted frominstall/imaging_install.sh
. It is now called by this file and the database image.test/imaging_install_test.sh
. This part is not final yet (we need to see how to integrate this with the S3 bucket). This is a copy ofinstall/imaging_install.sh
that sets up the appropriate file structure for LORIS-MRI. There are many differences in the environment (users, files...) so I don't think we can avoid the duplication here.The GitHub Actions are the following:
.github/workflows/integration.yml
. It builds the Docker images and run the integration tests in these images (there is only a mock up test for now). Since the image layers are cached in the GitHub Actions Cache, they can be built regularly in a relatively quick manner.Another notable change is that except for building the database, the tests no longer depend on LORIS core. That is, we notably do not depend on PHP or LORIS core integration tests.