Skip to content

osohq/run-polar-tests

Repository files navigation

Run Oso Cloud Polar tests

Summary

GitHub Action that uses the Oso Cloud CLI to run all polar tests in the current repository.

Currently searches for all .polar files that are not symlinks, in order to prevent errors caused by duplicating syntax.

All .polar files that compose the policy must be tested together, because rules in one polar file may refer to entities that are defined in another.

Polar tests are unit tests for your authorization code in Oso Cloud. For a detailed overview of Polar tests, please see the Oso Cloud policy tests guide.

The Oso Cloud CLI should be installed on the runner before using this action. Use the setup-oso-cloud action to do this.

Environment Variables

OSO_AUTH: API Key for the Oso Cloud environment to use for tests. Can be aread-only key. The environment's policy code will not be overwritten.

env:
  OSO_AUTH: ${{ secrets.YOUR_OSO_CLOUD_API_KEY_SECRET_NAME }}

Inputs

none

Outputs

none

Succeeds if the oso-cloud test command succeeds, fails otherwise.

About

Runs polar tests against the Oso Cloud environment specified by the provided API key.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published