CheckMate is a simplistic approach to run a wide variety of checks in my daily business.
It was originally created to run those checks on a big number (200+) of repositories in their CI pipelines.
CheckMate needs a checks/ directory right aside the CheckMate.ps1 script.
Every ps1 file inside this directory will be executed by CheckMate.
Therefor CheckMate hands over the base path of the test object, examplewise the root folder of a git repository.
On the other hand CheckMate expects the script to return some kind of useful message and an exit code the level of success. Like in every pipeline tool I know the exit code 0 indicates a succesful check, every other exit code has to be examined.
This repository contains some example-wise checks, so perhaps it is easier for you to adapt by adapting checks by that code.
CheckMate is created to be simplistic by itself - nevertheless it gives you the possibilties to extend it with complex checks yourself.
So CheckMate only needs to be run in a PowerShell Core 7+.
- Import CheckMate
Go and import the CheckMade Module in your current PowerShell session, e.g.:
Import-Module CheckMate.psd1- Invoke CheckMate to run its tests
Invoke-CheckMateCheckMate will fall back to its current directory a test object, use the checks directory for the tests to run and generate a report file by itself.
Anyhow, you can alter these default configuration by using the corresponding parameters:
./Invoke-CheckMate -repoPath "." -ChecksBasePath "./checks/Sanity" -ReportPath "CheckResults.md"CheckMate is licensed under the MIT License.