Skip to content

Conftest

Actions
Write tests against structured configuration data using Open Policy Agent
v0.4.0
Latest
Star (33)

Conftest

A GitHub Action for using Conftest in your workflows.

You can use the action as follows:

on: push
name: Validate
jobs:
  conftest:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: test
      uses: instrumenta/conftest-action@master
      with:
        files: deployment.yaml

The Conftest Action has a small number of properties which map to the parameters for Conftest itself. These are passed to the action using with, as demonstrated with files in the above example.

Property Default Description
files - Required which files to test
policy policy Where to find the policy folder or files
namespace main The Rego namespace to use for testing
output stdout How to format the output from Conftest (stdout, json or tap)

Helm

Conftest also has a Helm plugin which makes testing Helm charts easier, and that plugin is also available as an Action.

You can use the action as follows:

on: push
name: Validate
jobs:
  conftest:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: test
      uses: instrumenta/conftest-action/helm@master
      with:
        chart: mysql

The Conftest Helm Action has a small number of properties which map to the parameters for Conftest itself. These are passed to the action using with, as demonstrated with chart in the above example.

Property Default Description
chart - Required which chart directory to test
policy policy Where to find the policy folder or files
namespace main The Rego namespace to use for testing
output stdout How to format the output from Conftest (stdout, json or tap)

Conftest is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Write tests against structured configuration data using Open Policy Agent
v0.4.0
Latest

Conftest is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.