-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
73 changed files
with
8,551 additions
and
2,519 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,48 @@ | ||
name: AuthZ Unittests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
openfga: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install FGA CLI | ||
run: | | ||
wget https://github.com/openfga/cli/releases/download/v0.6.1/fga_0.6.1_linux_amd64.deb | ||
sudo apt-get install -yqq ./fga_0.6.1_linux_amd64.deb | ||
- name: Validate Collaboration Model | ||
run: | | ||
BASE_PATH=authz/openfga/collaboration_model | ||
LAST_VERSION=$(ls $BASE_PATH | sort -r | head -n 1) | ||
VALIDATION_OUTPUT=$(fga model validate --file $BASE_PATH/$LAST_VERSION/schema.fga) | ||
echo $VALIDATION_OUTPUT | jq -e '.is_valid == true' > /dev/null || { echo "Validation failed"; exit 1; } | ||
- name: Test Collaboration Model | ||
run: | | ||
BASE_PATH=authz/openfga/collaboration_model | ||
LAST_VERSION=$(ls $BASE_PATH | sort -r | head -n 1) | ||
fga model test --tests $BASE_PATH/$LAST_VERSION/store.fga.yaml | ||
- name: Check json up-to-date | ||
run: | | ||
BASE_PATH=authz/openfga/collaboration_model | ||
LAST_VERSION=$(ls $BASE_PATH | sort -r | head -n 1) | ||
DESIRED_SCHEMA_JSON=$(fga model transform --file $BASE_PATH/$LAST_VERSION/schema.fga) | ||
CURRENT_SCHEMA_JSON=$(cat $BASE_PATH/$LAST_VERSION/schema.json) | ||
echo $DESIRED_SCHEMA_JSON | jq -e '. == '"$CURRENT_SCHEMA_JSON" > /dev/null || { echo "Schema json is not up-to-date"; exit 1; } |
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,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run iceberg-catalog" type="CargoCommandRunConfiguration" factoryName="Cargo Command"> | ||
<option name="buildProfileId" value="dev" /> | ||
<option name="command" value="run --package iceberg-catalog-bin --bin iceberg-catalog" /> | ||
<option name="workingDirectory" value="file://$PROJECT_DIR$" /> | ||
<envs /> | ||
<option name="emulateTerminal" value="true" /> | ||
<option name="channel" value="DEFAULT" /> | ||
<option name="requiredFeatures" value="true" /> | ||
<option name="allFeatures" value="true" /> | ||
<option name="withSudo" value="false" /> | ||
<option name="buildTarget" value="REMOTE" /> | ||
<option name="backtrace" value="SHORT" /> | ||
<option name="isRedirectInput" value="false" /> | ||
<option name="redirectInputPath" value="" /> | ||
<method v="2"> | ||
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
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,20 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Test iceberg-catalog" type="CargoCommandRunConfiguration" factoryName="Cargo Command"> | ||
<option name="buildProfileId" value="test" /> | ||
<option name="command" value="test --workspace" /> | ||
<option name="workingDirectory" value="file://$PROJECT_DIR$" /> | ||
<envs /> | ||
<option name="emulateTerminal" value="true" /> | ||
<option name="channel" value="DEFAULT" /> | ||
<option name="requiredFeatures" value="true" /> | ||
<option name="allFeatures" value="true" /> | ||
<option name="withSudo" value="false" /> | ||
<option name="buildTarget" value="REMOTE" /> | ||
<option name="backtrace" value="SHORT" /> | ||
<option name="isRedirectInput" value="false" /> | ||
<option name="redirectInputPath" value="" /> | ||
<method v="2"> | ||
<option name="CARGO.BUILD_TASK_PROVIDER" enabled="true" /> | ||
</method> | ||
</configuration> | ||
</component> |
22 changes: 22 additions & 0 deletions
22
.sqlx/query-26bd0bc7465c39b18aead34361447d4135e95e648756ed48d4c7307e836fc445.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...fc3a26029093aeab467746b9364678d60e39.json → ...e9b51086398b361f68cecf288b938419299d.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...f73b595e13f359b5a5262886d0fdd7787d89.json → ...9c0fd7bbd66f5d6cb3e2647ede55908dfcd0.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
.sqlx/query-8433eb675bfcb5889af1630acc05111399d8f4ebbeef8305ec7191e5ed4fe62f.json
This file was deleted.
Oops, something went wrong.
97 changes: 0 additions & 97 deletions
97
.sqlx/query-912d8790ca799aee4352541d7d952bc41f9c7370f807c06d519d65afd95de29d.json
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
.sqlx/query-a3f11deca8e24c4cf4ad2a5e0c39bb678d30c9f7ab7619a8050e5c7c4456517a.json
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
.sqlx/query-c55a718665b391b12d46e0e3e3fa165160719ce6d16ce3b1c86fbc128eb4c6cb.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
.sqlx/query-d5bd155e925d579cac2091d20b67070e2d8ae7595b5ef43eb4ddffdbf169482a.json
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
.sqlx/query-d91c1870ad0bed668cff251ac0f4d9bdae0e58c4af5c31c2079d17a58c336e5b.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.