Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Latest commit

 

History

History
 
 

styra-das-test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

styra-das-test

An opinionated action to execute unit tests for Rego rules inside Styra DAS.

The following files are expected to exist in your project:

  • policies/policy/com.styra.envoy.ingress/test/test/test.rego
  • policies/policy/com.styra.envoy.ingress/rules/rules/ingress.rego

The DAS system name is expected to follow the Extenda Retail naming convention: <permission-prefix>.<service-name>-staging.

Usage

See action.yml.

Example

jobs:
  test-opa:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: extenda/actions/gcp-secret-manager@v0
        with:
          service-account-key: ${{ secrets.SECRET_AUTH }}
          secrets: |
            STYRA_TOKEN: styra-das-token

      - name: OPA/Rego unit tests
        uses: extenda/actions/styra-das-test@v0
        with:
          styra-das-token: ${{ env.STYRA_TOKEN }}
          permission-prefix: tst
          service-name: my-service