This repository provides an easy way to test your CFML code on one or more CFML engines using CommandBox. It currently supports integration with Travis-CI and GitLab CI, adding support for additional CI environments should be pretty easy.
Checkout the cfmatrix-example-pass repository for a very simple example of how you use this.
The CI script will fire up a CFML engine specified by the CFENGINE
environment variable matrix in your build script using box server start cfengine=$CFENGINE
Next it makes a request to the TEST_RUNNER_URI
that you specify, for example /test/run.cfm
it will output the results of that run (this can be code that invokes a testbox runner, or simply a bunch of custom test cases).
If the result of the TEST_RUNNER_URI
is a non 200
HTTP status code the build will fail.
If you are using Travis CI simply copy the .travis.yml
file from this repository and put it in the root of your repository. You can edit the env
section to specify a different TEST_RUNNER_URI
or you can remove CFENGINE
from the test (this is a good idea, it will take a really long to time to run the tests).
Click on the build status button above to see the test matrix results, you can see the results for each CFML engine that was run.
To use GitLab CI, simply copy the .gitlab-ci.yml
file into the root of your repository. You can add a test pipeline for each CFENGINE
you want to use.