-
Notifications
You must be signed in to change notification settings - Fork 1
147 lines (121 loc) · 4.87 KB
/
pull-request.yml
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
name: Generate SDKs and raise PRs in individual language repositories
env:
USER_API_KEY: ${{ secrets.USER_API_KEY }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}
USER: ${{ secrets.USER }}
OPENAPI_GENERATOR_VERSION: 5.1.0
GITHUB_DOTNET_SDK_REPO: factset/analyticsapi-engines-dotnet-sdk
GITHUB_PYTHON_SDK_REPO: factset/analyticsapi-engines-python-sdk
GITHUB_JAVA_SDK_REPO: factset/analyticsapi-engines-java-sdk
GITHUB_R_SDK_REPO: factset/analyticsapi-engines-r-sdk
on:
pull_request:
branches: [master]
jobs:
dotnet:
runs-on: ubuntu-latest
steps:
- name: Check out SDK repository
if: env.GITHUB_DOTNET_SDK_REPO
uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_DOTNET_SDK_REPO }}
path: sdk
fetch-depth: 0
token: ${{ env.USER_API_KEY }}
- name: Check out Generator repository
if: env.GITHUB_DOTNET_SDK_REPO
uses: actions/checkout@v2
with:
path: generator
- name: Generate SDK
if: env.GITHUB_DOTNET_SDK_REPO
run: generator/.github/scripts/generate-sdk.sh $OPENAPI_GENERATOR_VERSION dotnet CustomCSharpNetCoreClientCodegen openapi-schema-oneof-referenced-schema.json
- name: Raise pull request on SDK repository
if: env.GITHUB_DOTNET_SDK_REPO
run: generator/.github/scripts/raise-pull-request.sh dotnet
python:
runs-on: ubuntu-latest
steps:
- name: Check out SDK repository
if: env.GITHUB_PYTHON_SDK_REPO
uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_PYTHON_SDK_REPO }}
path: sdk
fetch-depth: 0
token: ${{ env.USER_API_KEY }}
- name: Check out Generator repository
if: env.GITHUB_PYTHON_SDK_REPO
uses: actions/checkout@v2
with:
path: generator
- name: Generate SDK
if: env.GITHUB_PYTHON_SDK_REPO
run: generator/.github/scripts/generate-sdk.sh $OPENAPI_GENERATOR_VERSION python CustomPythonClientCodegen openapi-schema.json
- name: Raise pull request on SDK repository
if: env.GITHUB_PYTHON_SDK_REPO
run: generator/.github/scripts/raise-pull-request.sh python
java:
runs-on: ubuntu-latest
steps:
- name: Check out SDK repository
if: env.GITHUB_JAVA_SDK_REPO
uses: actions/checkout@v2
with:
repository: ${{ env.GITHUB_JAVA_SDK_REPO }}
path: sdk
fetch-depth: 0
token: ${{ env.USER_API_KEY }}
- name: Check out Generator repository
if: env.GITHUB_JAVA_SDK_REPO
uses: actions/checkout@v2
with:
path: generator
- name: Generate SDK
if: env.GITHUB_JAVA_SDK_REPO
run: generator/.github/scripts/generate-sdk.sh $OPENAPI_GENERATOR_VERSION java CustomJavaClientCodegen openapi-schema-oneof-referenced-schema.json
- name: Raise pull request on SDK repository
if: env.GITHUB_JAVA_SDK_REPO
run: generator/.github/scripts/raise-pull-request.sh java
#r:
#runs-on: ubuntu-latest
#env:
#R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
#RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
#steps:
#- name: Check out SDK repository
#if: env.GITHUB_R_SDK_REPO
#uses: actions/checkout@v2
#with:
#repository: ${{ env.GITHUB_R_SDK_REPO }}
#path: sdk
#fetch-depth: 0
#token: ${{ env.USER_API_KEY }}
#- name: Check out Generator repository
#if: env.GITHUB_R_SDK_REPO
#uses: actions/checkout@v2
#with:
#path: generator
#- name: Generate SDK
#if: env.GITHUB_R_SDK_REPO
#run: generator/.github/scripts/generate-sdk.sh $OPENAPI_GENERATOR_VERSION r CustomRClientCodegen
#- name: Set up R
#if: env.GITHUB_R_SDK_REPO
#uses: r-lib/actions/setup-r@v1
#with:
#r-version: "3.5.3"
#- name: Generate docs
#if: env.GITHUB_R_SDK_REPO
#run: |
#sudo apt-get install libcurl4-openssl-dev libssl-dev
#sudo apt-get install libprotoc-dev
#sudo Rscript -e "install.packages('jsonlite', repos = 'http://cran.us.r-project.org')"
#sudo Rscript -e "install.packages('httr', repos = 'http://cran.us.r-project.org')"
#sudo Rscript -e "install.packages('base64enc', repos = 'http://cran.us.r-project.org')"
#sudo Rscript -e "install.packages('factset.protobuf.stach', repos = 'http://cran.us.r-project.org')"
#sudo Rscript -e "install.packages('roxygen2', repos = 'http://cran.us.r-project.org')"
#sudo Rscript -e "roxygen2::roxygenize(roclets = c('rd', 'namespace'), package.dir = '${GITHUB_WORKSPACE}/generator/languages/r/sdk')"
#- name: Raise pull request on SDK repository
#if: env.GITHUB_R_SDK_REPO
#run: generator/.github/scripts/raise-pull-request.sh r