forked from openfga/sdk-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0bdaf91
Showing
200 changed files
with
38,317 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
# insert_final_newline = false | ||
charset = utf-8 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
|
||
[*.go] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.cs] | ||
indent_style = space | ||
indent_size = 4 |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 3 | ||
|
||
server: https://app.fossa.com | ||
|
||
project: | ||
id: github.com/openfga/sdk-generator | ||
name: github.com/openfga/sdk-generator | ||
link: openfga.dev | ||
url: github.com/openfga/sdk-generator |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* @openfga/core |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Semgrep | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
semgrep: | ||
name: Scan | ||
runs-on: ubuntu-latest | ||
container: | ||
image: returntocorp/semgrep | ||
if: (github.actor != 'dependabot[bot]' && github.actor != 'snyk-bot') | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: semgrep ci | ||
env: | ||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,192 @@ | ||
name: Run Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
|
||
jobs: | ||
test-generator: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Shellcheck | ||
run: make shellcheck | ||
|
||
build-and-test-js-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup git | ||
run: ./scripts/setup_git.sh | ||
env: | ||
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }} | ||
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | ||
|
||
- name: Clone the existing SDK | ||
run: ./scripts/clone_sdk.sh | ||
env: | ||
GITHUB_ORG_ID: ${{ secrets.JS_SDK_GITHUB_ORG_ID }} | ||
GITHUB_REPO_ID: ${{ secrets.JS_SDK_GITHUB_REPO_ID }} | ||
SSH_KEY: ${{ secrets.JS_SDK_SSH_KEY }} | ||
SDK_PATH: clients/fga-js-sdk | ||
KNOWN_HOSTS: ${{secrets.KNOWN_HOSTS}} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Run SDK Tests | ||
run: make test-client-js | ||
|
||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/node@master | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
args: clients/fga-js-sdk/ --sarif-file-output=snyk-js.sarif | ||
|
||
- name: Install FOSSA CLI | ||
run: |- | ||
mkdir -p ~/.local/bin | ||
export PATH=$PATH:$HOME/.local/bin | ||
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh -b ~/.local/bin | bash | ||
- name: Run FOSSA scan and upload build data | ||
working-directory: clients/fga-js-sdk | ||
env: | ||
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} | ||
run: |- | ||
export PATH=$PATH:$HOME/.local/bin | ||
fossa test | ||
- name: Check for SDK changes | ||
run: ./scripts/commit_push_changes.sh | ||
env: | ||
SDK_PATH: clients/fga-js-sdk | ||
DRY_RUN: 1 | ||
TAGGING_DISABLE: 1 | ||
GITHUB_ORG_ID: ${{ secrets.JS_SDK_GITHUB_ORG_ID }} | ||
GITHUB_REPO_ID: ${{ secrets.JS_SDK_GITHUB_REPO_ID }} | ||
SSH_KEY: ${{ secrets.JS_SDK_SSH_KEY }} | ||
|
||
build-and-test-go-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup git | ||
run: ./scripts/setup_git.sh | ||
env: | ||
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }} | ||
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | ||
|
||
- name: Clone the existing SDK | ||
run: ./scripts/clone_sdk.sh | ||
env: | ||
GITHUB_ORG_ID: ${{ secrets.GO_SDK_GITHUB_ORG_ID }} | ||
GITHUB_REPO_ID: ${{ secrets.GO_SDK_GITHUB_REPO_ID }} | ||
SSH_KEY: ${{ secrets.GO_SDK_SSH_KEY }} | ||
SDK_PATH: clients/fga-go-sdk | ||
GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=$tmpdir/known_hosts" | ||
KNOWN_HOSTS: ${{secrets.KNOWN_HOSTS}} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Run SDK Tests | ||
run: make test-client-go | ||
|
||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/golang@master | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
args: clients/fga-go-sdk/ --sarif-file-output=snyk-golang.sarif | ||
|
||
- name: Install FOSSA CLI | ||
run: |- | ||
mkdir -p ~/.local/bin | ||
export PATH=$PATH:$HOME/.local/bin | ||
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh -b ~/.local/bin | bash | ||
- name: Run FOSSA scan and upload build data | ||
working-directory: clients/fga-go-sdk | ||
env: | ||
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} | ||
run: |- | ||
export PATH=$PATH:$HOME/.local/bin | ||
fossa test | ||
- name: Check for SDK changes | ||
run: ./scripts/commit_push_changes.sh | ||
env: | ||
SDK_PATH: clients/fga-go-sdk | ||
DRY_RUN: 1 | ||
TAGGING_DISABLE: 1 | ||
GITHUB_ORG_ID: ${{ secrets.GO_SDK_GITHUB_ORG_ID }} | ||
GITHUB_REPO_ID: ${{ secrets.GO_SDK_GITHUB_REPO_ID }} | ||
SSH_KEY: ${{ secrets.GO_SDK_SSH_KEY }} | ||
|
||
build-and-test-dotnet-sdk: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup git | ||
run: ./scripts/setup_git.sh | ||
env: | ||
GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }} | ||
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | ||
|
||
- name: Clone the existing SDK | ||
run: ./scripts/clone_sdk.sh | ||
env: | ||
GITHUB_ORG_ID: ${{ secrets.DOTNET_SDK_GITHUB_ORG_ID }} | ||
GITHUB_REPO_ID: ${{ secrets.DOTNET_SDK_GITHUB_REPO_ID }} | ||
SSH_KEY: ${{ secrets.DOTNET_SDK_SSH_KEY }} | ||
SDK_PATH: clients/fga-dotnet-sdk | ||
KNOWN_HOSTS: ${{secrets.KNOWN_HOSTS}} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Run All Tests | ||
run: make test-client-dotnet | ||
|
||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/dotnet@master | ||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
with: | ||
args: clients/fga-dotnet-sdk/src/OpenFga.Sdk/ --sarif-file-output=snyk-dotnet.sarif | ||
|
||
- name: Install FOSSA CLI | ||
run: |- | ||
mkdir -p ~/.local/bin | ||
export PATH=$PATH:$HOME/.local/bin | ||
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh -b ~/.local/bin | bash | ||
- name: Run FOSSA scan and upload build data | ||
working-directory: clients/fga-dotnet-sdk | ||
env: | ||
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} | ||
run: |- | ||
export PATH=$PATH:$HOME/.local/bin | ||
fossa test | ||
# Note at the moment, our .NET SDK is failing FOSSA b/c of `Microsoft.NET.Sdk` - though we have gotten the clearance from the legal team to use it | ||
continue-on-error: true | ||
|
||
- name: Check for SDK changes | ||
run: ./scripts/commit_push_changes.sh | ||
env: | ||
SDK_PATH: clients/fga-dotnet-sdk | ||
DRY_RUN: 1 | ||
TAGGING_DISABLE: 1 | ||
GITHUB_ORG_ID: ${{ secrets.DOTNET_SDK_GITHUB_ORG_ID }} | ||
GITHUB_REPO_ID: ${{ secrets.DOTNET_SDK_GITHUB_REPO_ID }} | ||
SSH_KEY: ${{ secrets.DOTNET_SDK_SSH_KEY }} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.vscode | ||
.idea | ||
.env | ||
docs/openapi/*.json | ||
|
||
.DS_Store | ||
|
||
clients/**/* |
Oops, something went wrong.