The howlci API

howl.ci provides an API with several methods to interact with the CI environment. The howlci API can be used like any other ComputerCraft API like as os or fs: it is just a normal Lua table with methods attached!

log(level:string, message:any)

This is used to output an object string to the log. Any value for level is valid, though there are several explicitly supported by howl.ci:

debug, verbose Useful debugging information. Generally not relevant to the user
info Information the user might find interesting or useful
warn, warning A warning
error An error

status(status:string, message:any)

Change the status of the build, also writing to the log. It is worth noting that once a log level has been reached it is not possible to go to a "better" state: you can not change a failure to a success. There are three possible statuses a build can have:

success, ok, pass Everything worked as expected
failure, fail A test failed. This would generally be an assertion failing.
error An unexpected error occured

Note: You should always call this method at some point: if you don't then we'll presume something went wrong and mark the build as an error.

close()

Close this computer, ending the build.

resize(width:number, height:number)

Resize the terminal to a new set of dimensions.

getEnv(name:string):string|nil

Get an environment variable, returning nil if not found.

getConfig(name:string):string|nil

Get a config variable, returning nil if not found.

setDay(day:number)

Set the current day for all computers. This can be fetched with os.day().

setTime(day:number)

Set the current time for all computers, this is a number between 0 and 24000. This can be fetched with os.time().