Introduction
Kheops is currently in the prototype phase and under continuous development.
Kheops is a tool for linting software architectures. It is available as a Docker image that can run in GitHub Actions or locally.
Running on Github
There are a few steps to follow in order to enable Kheops for a code repository using Github Actions workflows:
- Use ci-pr.yml for
pull_requestevents - Use ci-push.yml for
pushevents - Update the sample
.ymlfiles to match your workflow; see configuration for details - Add the
.ymlfiles to the.github/workflowsfolder under your repository’s root - Commit and push the changes to your Github repository
Kheops-based workflows are now available for your repository through Github Actions and can be triggered based on the events specified in the .yml files.
- The output of Kheops for
pull_requestevents on a sample repository:
- The output of Kheops for
pushevents is visible in the Github workflow run output and looks like:
For more information, check out the Github actions workflows documentation.
Configuration
Before starting the Github workflow, make sure Github runners are configured. The sample
.ymlfiles are configured to use a self-hosted runner. Alternatively, you can configure Github-hosted runners.
Both ci-pr.yml and ci-push.yml contain a configurable parameters. The ones you need to be configured are:
Note that the directories and file paths below are relative to the Docker image.
WORKSPACE_DIR- directory inside the Docker container to which the root of your repository will be mapped; it is safe to use"/workspace"or"/tmp"as these already exist in the Docker imagePROJECT_DIR- full path to the subdirectory inside your repository which contains the code. For example if the code directory issrcand the repository has been mapped in/workspaceusingWORKSPACE_DIR, the correct path would be/workspace/src. For example:Local repository Directories in Docker container Parameters ---------------- ------------------------------- ---------- . /workspace WORKSPACE_DIR="/workspace" ├── src //code directory ├── src PROJECT_DIR="/workspace/src" ├── doc ├── doc └── pub └── pubINPUT_PARSER- analyzed language. Can beangular,typescriptorjuliaLOG_LEVEL- logging level. Useinfoordebug
Running locally
The parameters above are passed as input arguments to kheopscli. The list of arguments can inspected by running kheopscli with the --help option. First,
$ docker pull ghcr.io/oxoaresearch/kheops-compiled:latest
and run with the --help option
docker run -it ghcr.io/oxoaresearch/kheops-compiled:latest /kheopscli/bin/kheopscli --help
This page is still a work in progres and under construction… ¯(ツ)/¯ 0x0α Research, 2024.