@@ -41,136 +41,10 @@ jobs:
4141 run : npm install
4242 working-directory : core/generator/gapic-generator-typescript
4343
44- - name : Run bazel build
45- working-directory : core/generator/gapic-generator-typescript
46- run : bazelisk build --noremote_accept_cached '//...'
47-
48- - name : Run bazel test
49- working-directory : core/generator/gapic-generator-typescript
50- run : bazelisk test --test_output=errors --noremote_accept_cached //...
51-
52- - name : Verify error conformance
44+ - name : Strip local GCC 15 flags for CI
5345 working-directory : core/generator/gapic-generator-typescript
54- run : |
55- curl -sSL https://github.com/googleapis/gapic-config-validator/releases/download/v0.6.0/gapic-config-validator-0.6.0-linux-amd64.tar.gz > config-validator.tar.gz
56- tar xzf config-validator.tar.gz --no-same-owner
57- chmod +x gapic-error-conformance
58- chmod +x bazel-bin/protoc_plugin_/protoc_plugin
59- ./gapic-error-conformance -plugin="bazel-bin/protoc_plugin_/protoc_plugin"
46+ run : sed -i '/--gsframe/d' .bazelrc
6047
61- - name : Prepare baseline artifacts
62- working-directory : core/generator/gapic-generator-typescript
63- run : |
64- mkdir -p ~/artifacts
65- cp bazel-testlogs/unit_tests/test.outputs/outputs.zip ~/artifacts/
66- bazelisk run -- @pnpm//:pnpm --dir $PWD install
67- tar cfz ~/artifacts/node_modules.tar.gz node_modules
68-
69- - name : Save artifacts
70- uses : actions/upload-artifact@v5
71- with :
72- name : artifacts
73- path : ~/artifacts
74-
75- - name : Test generated libraries
76- working-directory : core/generator/gapic-generator-typescript
77- run : |
78- set -ex
79- unzip ~/artifacts/outputs.zip -d library
80- for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do
81- echo "--- Testing library $lib ---"
82- cd library/.test-out-$lib
83- npm install
84- npm test
85- npm run fix
86- rm -rf build
87- npm run compile
88- npm run system-test
89- npm run docs
90- cd ../..
91- done
92-
93- - name : Test generated ESM libraries
94- working-directory : core/generator/gapic-generator-typescript
95- run : |
96- set -ex
97- for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do
98- echo "--- Testing ESM library $lib ---"
99- cd library/.test-out-$lib-esm
100- npm install
101- npm test
102- npm run fix
103- rm -rf build
104- npm run compile
105- npm run system-test
106- cd ../..
107- done
108- - name : Test combined library (Speech)
109- if : steps.generator-changes.outputs.changes == 'true'
110- env :
111- TEST_ENV_DESTINATION_PATH : generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
112- run : generator/gapic-generator-typescript/rules_typescript_gapic/combine_script.sh generator/gapic-generator-typescript/test-fixtures/google-cloud-speech-nodejs v1 "" "" generator/gapic-generator-typescript/node_modules/gapic-tools/build/src/compileProtos.js generator/gapic-generator-typescript/node_modules/gapic-node-processing/build/src/cli.js ""
113-
114- - name : Run tests for combined library (Speech)
115- if : steps.generator-changes.outputs.changes == 'true'
116- run : |
117- set -ex
118- cd generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
119- npm install
120- npm test
121- npm run system-test
122-
123- - name : Test combined library (Tasks)
124- if : steps.generator-changes.outputs.changes == 'true'
125- env :
126- TEST_ENV_DESTINATION_PATH : generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
127- run : generator/gapic-generator-typescript/rules_typescript_gapic/combine_script.sh generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks-nodejs v2 "" "" generator/gapic-generator-typescript/node_modules/gapic-tools/build/src/compileProtos.js generator/gapic-generator-typescript/node_modules/gapic-node-processing/build/src/cli.js ""
128-
129- - name : Run tests for combined library (Tasks)
130- if : steps.generator-changes.outputs.changes == 'true'
131- run : |
132- set -ex
133- cd generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
134- npm install
135- npm test
136- npm run system-test
137-
138- continuous :
139- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
140- runs-on : ubuntu-latest
141- container : gcr.io/gapic-images/googleapis:20250404
142- steps :
143- - uses : actions/checkout@v5
144- with :
145- fetch-depth : 2 # Need at least two commits for HEAD~..
146-
147- - name : Mark repo as safe for git
148- run : git config --global --add safe.directory "$GITHUB_WORKSPACE"
149-
150- - name : Compute GIT_DIFF_ARG
151- id : diff-logic
152- run : |
153- # For continuous build, we want to know the difference in the last
154- # commit. This assumes we use squash commit when merging PRs.
155- git fetch origin main --deepen=1
156- echo "GIT_DIFF_ARG=HEAD~.." >> $GITHUB_ENV
157-
158- - name : Cache Bazel files
159- id : cache-bazel
160- uses : actions/cache@v5
161- with :
162- path : ~/.cache/bazel
163- key : ${{ runner.os }}-googleapis-20250422-${{ secrets.CACHE_VERSION }}
164-
165- - name : Setup Node.js
166- uses : actions/setup-node@v6
167- with :
168- node-version : 18.x
169-
170- - name : Install Node dependencies with npm
171- run : npm install
172- working-directory : core/generator/gapic-generator-typescript
173-
17448 - name : Run bazel build
17549 working-directory : core/generator/gapic-generator-typescript
17650 run : bazelisk build --noremote_accept_cached '//...'
@@ -235,7 +109,7 @@ jobs:
235109 npm run system-test
236110 cd ../..
237111 done
238- - name: Test combined library (Speech)
112+ - name : Test combined library (Speech)
239113 if : steps.generator-changes.outputs.changes == 'true'
240114 env :
241115 TEST_ENV_DESTINATION_PATH : generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
@@ -263,4 +137,4 @@ jobs:
263137 cd generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
264138 npm install
265139 npm test
266- npm run system-test
140+ npm run system-test
0 commit comments