Skip to content

Run Tests

Run Tests #870

Workflow file for this run

name: Run Tests
on:
merge_group:
pull_request:
jobs:
test-generator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Shellcheck
run: make shellcheck
build-and-test-js-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
repository: openfga/js-sdk
path: clients/fga-js-sdk
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Run SDK Tests
run: make test-client-js
- name: Check for SDK changes
run: |
cd clients/fga-js-sdk
if $(git status | grep -q "nothing to commit"); then
echo "CLEAN: no changes found"
exit 0
fi
echo "DIRTY: changes found"
git status
git diff
build-and-test-go-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
repository: openfga/go-sdk
path: clients/fga-go-sdk
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Run SDK Tests
run: make test-client-go
- name: Check for SDK changes
run: |
cd clients/fga-go-sdk
if $(git status | grep -q "nothing to commit"); then
echo "CLEAN: no changes found"
exit 0
fi
echo "DIRTY: changes found"
git status
git diff
build-and-test-dotnet-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
repository: openfga/dotnet-sdk
path: clients/fga-dotnet-sdk
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Run All Tests
run: make test-client-dotnet
- name: Check for SDK changes
run: |
cd clients/fga-dotnet-sdk
if $(git status | grep -q "nothing to commit"); then
echo "CLEAN: no changes found"
exit 0
fi
echo "DIRTY: changes found"
git status
git diff
build-and-test-python-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Specify python version
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.10"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
repository: openfga/python-sdk
path: clients/fga-python-sdk
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Run All Tests
run: |-
make test-client-python
- name: Check for SDK changes
run: |
cd clients/fga-python-sdk
if $(git status | grep -q "nothing to commit"); then
echo "CLEAN: no changes found"
exit 0
fi
echo "DIRTY: changes found"
git status
git diff
build-and-test-java-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
with:
java-version: 11
distribution: "temurin"
cache: "gradle"
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
repository: openfga/java-sdk
path: clients/fga-java-sdk
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Run All Tests
run: |-
make test-integration-client-java
- name: Check for SDK changes
run: |
cd clients/fga-java-sdk
if $(git status | grep -q "nothing to commit"); then
echo "CLEAN: no changes found"
exit 0
fi
echo "DIRTY: changes found"
git status
git diff