Skip to content

Automated tests for templates

Mladen edited this page Aug 16, 2023 · 4 revisions

Investigation results

During investigation, it was shown that is possible to test devcontainer build in the CI workflow using Devcontainers CI action.

Problem with docker-in-docker does not exist anymore.

Once when devcontainer is built successfully, there is a possibility to execute commands or run scripts in there what will be useful for us to make sure that our template works as expected. In order to execute automated tests locally as well as in the CI workflow, there is a need to develop tests as scripts (bash, Python, ...) what could be called from the CI workflow action or locally executed.

Proposed structure for automated tests is:

└── tests
    └── automated_tests
        ├── runtime_tests
            ├── local_runtime_test.(sh/py)
            ├── k3d_runtime_test.(sh/py)
            ├── kanto_runtime_test.(sh/py)
        ├── requirements_test.(sh/py)
        └── import_examples_test.(sh/py)

An example, how to start particular runtime in a devcontainer inside CI workflow, see CI workflow run

Clone this wiki locally