-
Notifications
You must be signed in to change notification settings - Fork 43
170 lines (142 loc) · 5.01 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Run Tests
on:
merge_group:
pull_request:
jobs:
test-generator:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Shellcheck
run: make shellcheck
build-and-test-js-sdk:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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: 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@v3
- 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: 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@v3
- 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: 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 }}
build-and-test-python-sdk:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Specify python version
uses: actions/setup-python@v4
with:
python-version: '3.10'
- 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.PYTHON_SDK_GITHUB_ORG_ID }}
GITHUB_REPO_ID: ${{ secrets.PYTHON_SDK_GITHUB_REPO_ID }}
SSH_KEY: ${{ secrets.PYTHON_SDK_SSH_KEY }}
SDK_PATH: clients/fga-python-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-python
- name: Check for SDK changes
run: ./scripts/commit_push_changes.sh
env:
SDK_PATH: clients/fga-python-sdk
DRY_RUN: 1
TAGGING_DISABLE: 1
GITHUB_ORG_ID: ${{ secrets.PYTHON_SDK_GITHUB_ORG_ID }}
GITHUB_REPO_ID: ${{ secrets.PYTHON_SDK_GITHUB_REPO_ID }}
SSH_KEY: ${{ secrets.PYTHON_SDK_SSH_KEY }}