-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 parent
a3b9196
commit 9a76b17
Showing
1 changed file
with
80 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,80 @@ | ||
name: "Build Python SDK" | ||
|
||
env: | ||
SAIL_CLIENT_ID: ${{ secrets.SDK_TEST_TENANT_CLIENT_ID }} | ||
SAIL_CLIENT_SECRET: ${{ secrets.SDK_TEST_TENANT_CLIENT_SECRET }} | ||
SAIL_BASE_URL: ${{ secrets.SDK_TEST_TENANT_BASE_URL }} | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_python_sdk: | ||
name: Build Python SDK | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Checkout API Specs Repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: sailpoint-oss/api-specs | ||
path: api-specs | ||
ref: main | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "16" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Run Prescript | ||
id: prescript | ||
run: | | ||
node sdk-resources/prescript.js api-specs/idn | ||
- name: Build V3 SDK | ||
id: buildV3 | ||
if: steps.prescript.outcome == 'success' | ||
run: | | ||
rm -rf ./sailpoint/v3 | ||
java -jar openapi-generator-cli-7.0.1.jar generate -i api-specs/idn/sailpoint-api.v3.yaml -g python -o sailpoint --global-property skipFormModel=false --config sdk-resources/v3-config.yaml --enable-post-process-file | ||
- name: Build Beta SDK | ||
id: buildBeta | ||
if: steps.buildV3.outcome == 'success' | ||
run: | | ||
rm -rf ./sailpoint/beta | ||
java -jar openapi-generator-cli-7.0.1.jar generate -i api-specs/idn/sailpoint-api.beta.yaml -g python -o sailpoint --global-property skipFormModel=false --config sdk-resources/beta-config.yaml --enable-post-process-file | ||
node sdk-resources/postscript.js ./sailpoint/beta | ||
- name: Build V2 SDK | ||
id: buildV2 | ||
if: steps.buildBeta.outcome == 'success' | ||
run: | | ||
rm -rf ./sailpoint/v2 | ||
java -jar openapi-generator-cli-7.0.1.jar generate -i api-specs/idn/sailpoint-api.v2.yaml -g python -o sailpoint --global-property skipFormModel=false --config sdk-resources/v2-config.yaml --enable-post-process-file | ||
- name: Build CC SDK | ||
id: buildCC | ||
if: steps.buildV2.outcome == 'success' | ||
run: | | ||
rm -rf ./sailpoint/cc | ||
java -jar openapi-generator-cli-7.0.1.jar generate -i api-specs/idn/sailpoint-api.cc.yaml -g python -o sailpoint/ --global-property skipFormModel=false --config sdk-resources/cc-config.yaml --enable-post-process-file | ||
- name: After SDK Build | ||
if: steps.buildCC.outcome == 'success' | ||
run: | | ||
pip install -r requirements.txt | ||
python validation_test.py -v |