Skip to content

openfga/action-openfga-test

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

OpenFGA Github Action - Test

FOSSA Status

This action can be used to test your authorization model using store test files.

Parameter

Parameter Description Required Default
test_path The path to your store test file or folder relative to the root of your project. No .
test_files_pattern The pattern to match test files. No *.fga.yaml

Note: the action will fail if no test is found in the specified test path with the given pattern

Examples

Running tests of *.fga.yaml files present in the repository

name: Test Action

on:
  workflow_dispatch:

jobs:
  test:
    name: Run test
    runs-on: ubuntu-latest
    steps:
      - uses: openfga/action-openfga-test@v0.1

Running tests of *.fga.yaml files present in a given folder

name: Test Action

on:
  workflow_dispatch:

jobs:
  test:
    name: Run test
    runs-on: ubuntu-latest
    steps:
      - uses: openfga/action-openfga-test@v0.1.0
        with:
          test_path: example

Running tests of a single file

name: Test Action

on:
  workflow_dispatch:

jobs:
  test:
    name: Run test
    runs-on: ubuntu-latest
    steps:
      - uses: openfga/action-openfga-test@v0.1
        with:
          test_path: example/model.fga.yaml

License

FOSSA Status