Metadrop / drupal-boilerplate

Drupal projects up and running with Docker and many other tools in minutes
28 stars 23 forks source link

Add automatic testing #123

Closed rsanzante closed 9 months ago

rsanzante commented 1 year ago

This boilerplate includes a lot of functionality that can be broken because of new commits. We need to test offered functionalities automatically.

Next steps

Figure out how to test it. We need an environment that runs composer project and has docker and docker compose available.

rsanzante commented 10 months ago

Work is being done in the feature/add-testing-base branch.

shellspec has bee chosen to run tests. It is a BDD unit testing framework for POSIX shells, and this boilerplate can be tested using console commands.

Currently, tests work locally but not in Github. In Github, the problem is the host uses the user id 1001 while the containers use the id 1000.

To run tests locally do:

Then run the tests running the downloaded shellspec binary in the root folder of the boilerplate.