@@ -2,9 +2,9 @@ name: OpenCue Testing Pipeline
2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches : [ master, cueweb ]
6
6
pull_request :
7
- branches : [ master ]
7
+ branches : [ master, cueweb ]
8
8
9
9
jobs :
10
10
test_python_2022 :
@@ -104,6 +104,101 @@ jobs:
104
104
- name : Run Sphinx build
105
105
run : ci/build_sphinx_docs.sh
106
106
107
+ test_cueweb :
108
+ name : Run CueWeb Tests
109
+ runs-on : ubuntu-latest
110
+ steps :
111
+ - name : Checkout repository
112
+ uses : actions/checkout@v2
113
+ - name : Use Node.js
114
+ uses : actions/setup-node@v1
115
+ with :
116
+ node-version : 21.x
117
+ - name : install dependencies for cueweb
118
+ run : npm install
119
+ working-directory : ./cueweb
120
+ - name : Run tests in Docker container
121
+ run : npm test
122
+ working-directory : ./cueweb
123
+ test_rest_gateway :
124
+ name : Run Rest Gateway Tests
125
+ runs-on : ubuntu-latest
126
+ steps :
127
+ - name : Checkout repository
128
+ uses : actions/checkout@v3
129
+ - name : Set up Go
130
+ uses : actions/setup-go@v3
131
+ with :
132
+ go-version : ' 1.21'
133
+ - name : Install Protobuf
134
+ run : |
135
+ sudo apt-get install -y protobuf-compiler
136
+ npm install -g protobuf-compiler
137
+ working-directory : ./rest_gateway/opencue_gateway
138
+ - name : Install dependencies
139
+ run : go mod init opencue_gateway && go mod tidy
140
+ working-directory : ./rest_gateway/opencue_gateway
141
+ - name : Install Go tools
142
+ run : |
143
+ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
144
+ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
145
+ go install github.com/golang-jwt/jwt/v5
146
+ go install google.golang.org/protobuf/cmd/protoc-gen-go
147
+ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
148
+ working-directory : ./rest_gateway/opencue_gateway
149
+ - name : Copy proto files
150
+ run : |
151
+ cp ./proto /app/proto
152
+ - name : Copy gateway files
153
+ run : |
154
+ cp ./rest_gateway/opencue_gateway /app/opencue_gateway
155
+ - name : Generate go grpc code
156
+ run : |
157
+ mkdir -p gen/go && \
158
+ protoc -I ../proto/ \
159
+ --go_out ./gen/go/ \
160
+ --go_opt paths=source_relative \
161
+ --go-grpc_out ./gen/go/ \
162
+ --go-grpc_opt paths=source_relative \
163
+ ../proto/*.proto
164
+ working-directory : ./rest_gateway/opencue_gateway
165
+ - name : Generate grpc-gateway handlers
166
+ run : |
167
+ protoc -I ../proto/ --grpc-gateway_out ./gen/go \
168
+ --grpc-gateway_opt paths=source_relative \
169
+ --grpc-gateway_opt generate_unbound_methods=true \
170
+ ../proto/*.proto
171
+ working-directory : ./rest_gateway/opencue_gateway
172
+ - name : Run Go Unit Tests
173
+ run : go test -v
174
+ working-directory : ./rest_gateway/opencue_gateway
175
+ # test_rest_gateway:
176
+ # name: Run Rest Gateway Tests
177
+ # runs-on: ubuntu-latest
178
+ # steps:
179
+ # - name: Checkout repository
180
+ # uses: actions/checkout@v2
181
+ # - name: Setup Go
182
+ # uses: actions/setup-go@v3
183
+ # with:
184
+ # go-version: '1.21'
185
+ # - name: Initialize go module and install dependencies
186
+ # run: |
187
+ # cd rest_gateway/opencue_gateway
188
+ # go mod init opencue_gateway && go mod tidy
189
+ # - name: Install protoc-gen-groc-gateway tool
190
+ # run: |
191
+ # go install \
192
+ # github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest \
193
+ # github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest \
194
+ # github.com/golang-jwt/jwt/v5@latest \
195
+ # google.golang.org/protobuf/cmd/protoc-gen-go@latest \
196
+ # google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
197
+ # - name: Run rest gateway tests
198
+ # run: |
199
+ # cd rest_gateway/opencue_gateway
200
+ # go test -v ./...
201
+
107
202
check_changed_files :
108
203
name : Check Changed Files
109
204
runs-on : ubuntu-latest
0 commit comments