-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update README with external server example
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,50 @@ jobs: | |
test_path: example/model.fga.yaml | ||
``` | ||
|
||
### Running tests against a given version of OpenFGA | ||
|
||
```yaml | ||
name: Test Action | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
test: | ||
name: Run test | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:14 | ||
env: | ||
POSTGRES_USER: openfga | ||
POSTGRES_PASSWORD: '1234' | ||
ports: | ||
- 5432:5432 | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
env: | ||
OPENFGA_DATASTORE_ENGINE: 'postgres' | ||
OPENFGA_DATASTORE_URI: 'postgres://openfga:[email protected]:5432/openfga' | ||
OPENFGA_LOG_LEVEL: debug | ||
steps: | ||
- name: Install OpenFGA server v1.5.3 | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: openfga/openfga | ||
tag: v1.5.3 | ||
cache: enable | ||
- name: Migrate OpenFGA database | ||
shell: bash | ||
run: openfga migrate | ||
- name: Start OpenFGA server in background | ||
shell: bash | ||
run: openfga run & | ||
- name: Run tests | ||
uses: openfga/[email protected] | ||
with: | ||
fga_server_url: 'http://localhost:8080' | ||
``` | ||
|
||
## License | ||
|
||
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fopenfga%2Faction-openfga-test.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fopenfga%2Faction-openfga-test?ref=badge_large) |