Skip to content

Commit 9149c19

Browse files
Revert "feat: add generator tests in actions" (#790)
* Revert "feat: add generator tests in actions" This reverts commit 294d084. * Revert "feat: add generator tests in actions" * Revert "feat: add generator tests in actions" This reverts commit 294d084.
1 parent 2a6287c commit 9149c19

File tree

3 files changed

+0
-275
lines changed

3 files changed

+0
-275
lines changed

.github/workflows/continuous.yaml

Lines changed: 0 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -47,140 +47,3 @@ jobs:
4747
env:
4848
BUILD_TYPE: continuous
4949
TEST_TYPE: lint
50-
generator-test:
51-
runs-on: ubuntu-latest
52-
container: gcr.io/gapic-images/googleapis:20250404
53-
# Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/master/Dockerfile
54-
# If you update its version, please also update it below in
55-
# 'Cache Bazel files' - unfortunately it cannot accept variables at this
56-
# time.
57-
58-
steps:
59-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
60-
with:
61-
fetch-depth: 300
62-
63-
- name: Get changed files
64-
id: changed-files
65-
uses: tj-actions/changed-files@v44
66-
with:
67-
files: generator/**
68-
69-
- name: Cache Bazel files
70-
if: steps.changed-files.outputs.any_changed == 'true'
71-
id: cache-bazel
72-
uses: actions/cache@v4
73-
with:
74-
path: ~/.cache/bazel
75-
key: ${{ runner.os }}-googleapis-20250422-${{ secrets.CACHE_VERSION }}
76-
77-
- name: Setup Node.js
78-
if: steps.changed-files.outputs.any_changed == 'true'
79-
uses: actions/setup-node@v6
80-
with:
81-
node-version: 18.x
82-
83-
- name: Install Node dependencies with npm
84-
if: steps.changed-files.outputs.any_changed == 'true'
85-
run: npm install
86-
87-
- name: Run bazel build
88-
if: steps.changed-files.outputs.any_changed == 'true'
89-
working-directory: ./generator/gapic-generator-typescript
90-
run: bazelisk build --noremote_accept_cached '//...'
91-
92-
- name: Run bazel test
93-
if: steps.changed-files.outputs.any_changed == 'true'
94-
working-directory: ./generator/gapic-generator-typescript
95-
run: bazelisk test --test_output=errors --noremote_accept_cached //...
96-
97-
- name: Verify error conformance
98-
if: steps.changed-files.outputs.any_changed == 'true'
99-
working-directory: ./generator/gapic-generator-typescript
100-
run: |
101-
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
102-
tar xzf config-validator.tar.gz --no-same-owner
103-
chmod +x gapic-error-conformance
104-
chmod +x bazel-bin/protoc_plugin_/protoc_plugin
105-
./gapic-error-conformance -plugin="bazel-bin/protoc_plugin_/protoc_plugin"
106-
107-
- name: Prepare baseline artifacts
108-
if: steps.changed-files.outputs.any_changed == 'true'
109-
working-directory: ./generator/gapic-generator-typescript
110-
run: |
111-
mkdir -p ~/artifacts
112-
cp bazel-testlogs/unit_tests/test.outputs/outputs.zip ~/artifacts/
113-
bazelisk run -- @pnpm//:pnpm --dir $PWD install
114-
tar cfz ~/artifacts/node_modules.tar.gz node_modules
115-
116-
- name: Save artifacts
117-
if: steps.changed-files.outputs.any_changed == 'true'
118-
uses: actions/upload-artifact@v5
119-
with:
120-
name: artifacts
121-
path: ~/artifacts
122-
123-
- name: Test generated libraries
124-
if: steps.changed-files.outputs.any_changed == 'true'
125-
run: |
126-
set -ex
127-
unzip ~/artifacts/outputs.zip -d library
128-
for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do
129-
echo "--- Testing library $lib ---"
130-
cd library/.test-out-$lib
131-
npm install
132-
npm test
133-
npm run fix
134-
rm -rf build
135-
npm run compile
136-
npm run system-test
137-
npm run docs
138-
cd ../..
139-
done
140-
141-
- name: Test generated ESM libraries
142-
if: steps.changed-files.outputs.any_changed == 'true'
143-
run: |
144-
set -ex
145-
for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do
146-
echo "--- Testing ESM library $lib ---"
147-
cd library/.test-out-$lib-esm
148-
npm install
149-
npm test
150-
npm run fix
151-
rm -rf build
152-
npm run compile
153-
npm run system-test
154-
cd ../..
155-
done
156-
157-
- name: Test combined library (Speech)
158-
if: steps.changed-files.outputs.any_changed == 'true'
159-
env:
160-
TEST_ENV_DESTINATION_PATH: generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
161-
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 ""
162-
163-
- name: Run tests for combined library (Speech)
164-
if: steps.changed-files.outputs.any_changed == 'true'
165-
run: |
166-
set -ex
167-
cd generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
168-
npm install
169-
npm test
170-
npm run system-test
171-
172-
- name: Test combined library (Tasks)
173-
if: steps.changed-files.outputs.any_changed == 'true'
174-
env:
175-
TEST_ENV_DESTINATION_PATH: generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
176-
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 ""
177-
178-
- name: Run tests for combined library (Tasks)
179-
if: steps.changed-files.outputs.any_changed == 'true'
180-
run: |
181-
set -ex
182-
cd generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
183-
npm install
184-
npm test
185-
npm run system-test
186-

.github/workflows/presubmit.yaml

Lines changed: 0 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -34,140 +34,3 @@ jobs:
3434
env:
3535
BUILD_TYPE: presubmit
3636
TEST_TYPE: lint
37-
generator-test:
38-
runs-on: ubuntu-latest
39-
container: gcr.io/gapic-images/googleapis:20250404
40-
# Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/master/Dockerfile
41-
# If you update its version, please also update it below in
42-
# 'Cache Bazel files' - unfortunately it cannot accept variables at this
43-
# time.
44-
45-
steps:
46-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
47-
with:
48-
fetch-depth: 300
49-
50-
- name: Get changed files
51-
id: changed-files
52-
uses: tj-actions/changed-files@v44
53-
with:
54-
files: generator/**
55-
56-
- name: Cache Bazel files
57-
if: steps.changed-files.outputs.any_changed == 'true'
58-
id: cache-bazel
59-
uses: actions/cache@v4
60-
with:
61-
path: ~/.cache/bazel
62-
key: ${{ runner.os }}-googleapis-20250422-${{ secrets.CACHE_VERSION }}
63-
64-
- name: Setup Node.js
65-
if: steps.changed-files.outputs.any_changed == 'true'
66-
uses: actions/setup-node@v6
67-
with:
68-
node-version: 18.x
69-
70-
- name: Install Node dependencies with npm
71-
if: steps.changed-files.outputs.any_changed == 'true'
72-
run: npm install
73-
74-
- name: Run bazel build
75-
if: steps.changed-files.outputs.any_changed == 'true'
76-
working-directory: ./generator/gapic-generator-typescript
77-
run: bazelisk build --noremote_accept_cached '//...'
78-
79-
- name: Run bazel test
80-
if: steps.changed-files.outputs.any_changed == 'true'
81-
working-directory: ./generator/gapic-generator-typescript
82-
run: bazelisk test --test_output=errors --noremote_accept_cached //...
83-
84-
- name: Verify error conformance
85-
if: steps.changed-files.outputs.any_changed == 'true'
86-
working-directory: ./generator/gapic-generator-typescript
87-
run: |
88-
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
89-
tar xzf config-validator.tar.gz --no-same-owner
90-
chmod +x gapic-error-conformance
91-
chmod +x bazel-bin/protoc_plugin_/protoc_plugin
92-
./gapic-error-conformance -plugin="bazel-bin/protoc_plugin_/protoc_plugin"
93-
94-
- name: Prepare baseline artifacts
95-
if: steps.changed-files.outputs.any_changed == 'true'
96-
working-directory: ./generator/gapic-generator-typescript
97-
run: |
98-
mkdir -p ~/artifacts
99-
cp bazel-testlogs/unit_tests/test.outputs/outputs.zip ~/artifacts/
100-
bazelisk run -- @pnpm//:pnpm --dir $PWD install
101-
tar cfz ~/artifacts/node_modules.tar.gz node_modules
102-
103-
- name: Save artifacts
104-
if: steps.changed-files.outputs.any_changed == 'true'
105-
uses: actions/upload-artifact@v5
106-
with:
107-
name: artifacts
108-
path: ~/artifacts
109-
110-
- name: Test generated libraries
111-
if: steps.changed-files.outputs.any_changed == 'true'
112-
run: |
113-
set -ex
114-
unzip ~/artifacts/outputs.zip -d library
115-
for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do
116-
echo "--- Testing library $lib ---"
117-
cd library/.test-out-$lib
118-
npm install
119-
npm test
120-
npm run fix
121-
rm -rf build
122-
npm run compile
123-
npm run system-test
124-
npm run docs
125-
cd ../..
126-
done
127-
128-
- name: Test generated ESM libraries
129-
if: steps.changed-files.outputs.any_changed == 'true'
130-
run: |
131-
set -ex
132-
for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do
133-
echo "--- Testing ESM library $lib ---"
134-
cd library/.test-out-$lib-esm
135-
npm install
136-
npm test
137-
npm run fix
138-
rm -rf build
139-
npm run compile
140-
npm run system-test
141-
cd ../..
142-
done
143-
144-
- name: Test combined library (Speech)
145-
if: steps.changed-files.outputs.any_changed == 'true'
146-
env:
147-
TEST_ENV_DESTINATION_PATH: generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
148-
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 ""
149-
150-
- name: Run tests for combined library (Speech)
151-
if: steps.changed-files.outputs.any_changed == 'true'
152-
run: |
153-
set -ex
154-
cd generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
155-
npm install
156-
npm test
157-
npm run system-test
158-
159-
- name: Test combined library (Tasks)
160-
if: steps.changed-files.outputs.any_changed == 'true'
161-
env:
162-
TEST_ENV_DESTINATION_PATH: generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
163-
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 ""
164-
165-
- name: Run tests for combined library (Tasks)
166-
if: steps.changed-files.outputs.any_changed == 'true'
167-
run: |
168-
set -ex
169-
cd generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
170-
npm install
171-
npm test
172-
npm run system-test
173-

ci/run_conditional_tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ subdirs=(
7474
dev-packages
7575
.github/scripts
7676
packages
77-
generator
7877
)
7978

8079
RETVAL=0

0 commit comments

Comments
 (0)