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_request
events - Use ci-push.yml for
push
events - Update the sample
.yml
files to match your workflow; see configuration for details - Add the
.yml
files to the.github/workflows
folder 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_request
events on a sample repository: - The output of Kheops for
push
events 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
.yml
files 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 issrc
and the repository has been mapped in/workspace
usingWORKSPACE_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 └── pub
INPUT_PARSER
- analyzed language. Can beangular
,typescript
orjulia
LOG_LEVEL
- logging level. Useinfo
ordebug
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.