Skip to main content
GitHub hero If you use GitHub to version control your AI system, you can connect its repository to your Openlayer project. By doing so, every push or pull request to a pre-defined branch triggers the evaluation of your Openlayer tests. This is the most common way to set up Openlayer’s development mode. In this case, Openlayer works as a step in your CI/CD pipeline.

Connecting GitHub account

The first step is connecting your GitHub account to Openlayer. To do so, navigate to “Settings” > “Integrations.” Click “Enable” next to the GitHub integration section. The Openlayer Integrations page, searched for GitHub, with the GitHub card and its Enable button After clicking “Enable,” a window should pop up asking you to log in. Follow the instructions on the screen to log into your GitHub account and select the organization where the Openlayer GitHub app should be installed. GitHub's Install Openlayer-AI page, asking where to install the app, with an organization listed Once a GitHub account is successfully connected to your GitHub account, you should see a “Manage” button, instead of “Enable.” The Openlayer Integrations page searched for GitHub, with GitHub under Configured and a Manage button on its card

Linking a GitHub repo to a project

Now that your GitHub account is connected to your Openlayer workspace, you can link a repo to an existing Openlayer project. Navigate to “Settings,” and then scroll down on the left sidebar to the project settings. Under the project you want to link a GitHub repo to, click on “Git repository.” The project's Git repository settings, with the connected GitHub organization selected and a Connect button next to each repository Click “Connect” next to the repo you want to link to the project. You will be asked for the:
  • Branch name: the branch of the Git repo being connected. Pushes and pull requests to this branch will trigger the evaluation of your tests.
  • Root directory: the directory within the Git repo that will get pushed to Openlayer. This should be the directory with Openlayer’s configurations (such as the openlayer.json).

Pushing changes

After linking your GitHub repo to your Openlayer project, all your pushes and pull requests to the branch you configured in the previous step will trigger the evaluation of your tests. In your GitHub repo, you should see the Openlayer app running. The GitHub checks panel on a pull request, with the Openlayer check passing and the message that all your Openlayer tests have passed If you navigate to your Openlayer project in app.openlayer.com, you should see the connected repo on the left sidebar. Furthermore, if you open the Commits page under your project’s Development module, you should see all the commits to Openlayer linked to the original GitHub commits. The project's Development Commits page, listing commits with their message, test count, pass rate, author, and date If you click the three dots on the right, you can view the commit logs. You can see the logs for all the steps involved and debug any issues associated with test evaluation. Commit logs