fix: nodejs-googleapis-common version in release-please-manifest (#538) #84
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| name: continuous | |
| jobs: | |
| units: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [18, 20, 22] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: ^10.0.0 | |
| - run: node --version | |
| - run: ci/run_conditional_tests.sh | |
| name: Run unit tests | |
| env: | |
| BUILD_TYPE: continuous | |
| TEST_TYPE: units | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - run: node --version | |
| - run: ci/run_conditional_tests.sh | |
| env: | |
| MOCHA_THROW_DEPRECATION: false | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 300 # Fetch all history for comparison | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - run: npm install | |
| - run: ci/run_conditional_tests.sh | |
| name: Run lint | |
| env: | |
| BUILD_TYPE: continuous | |
| TEST_TYPE: lint | |
| generator-test: | |
| runs-on: ubuntu-latest | |
| container: gcr.io/gapic-images/googleapis:20250404 | |
| # Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/master/Dockerfile | |
| # If you update its version, please also update it below in | |
| # 'Cache Bazel files' - unfortunately it cannot accept variables at this | |
| # time. | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| with: | |
| fetch-depth: 300 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v44 | |
| with: | |
| files: generator/** | |
| - name: Cache Bazel files | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| id: cache-bazel | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/bazel | |
| key: ${{ runner.os }}-googleapis-20250422-${{ secrets.CACHE_VERSION }} | |
| - name: Setup Node.js | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 18.x | |
| - name: Install Node dependencies with npm | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: npm install | |
| - name: Run bazel build | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ./generator/gapic-generator-typescript | |
| run: bazelisk build --noremote_accept_cached '//...' | |
| - name: Run bazel test | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ./generator/gapic-generator-typescript | |
| run: bazelisk test --test_output=errors --noremote_accept_cached //... | |
| - name: Verify error conformance | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ./generator/gapic-generator-typescript | |
| run: | | |
| 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 | |
| tar xzf config-validator.tar.gz --no-same-owner | |
| chmod +x gapic-error-conformance | |
| chmod +x bazel-bin/protoc_plugin_/protoc_plugin | |
| ./gapic-error-conformance -plugin="bazel-bin/protoc_plugin_/protoc_plugin" | |
| - name: Prepare baseline artifacts | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| working-directory: ./generator/gapic-generator-typescript | |
| run: | | |
| mkdir -p ~/artifacts | |
| cp bazel-testlogs/unit_tests/test.outputs/outputs.zip ~/artifacts/ | |
| bazelisk run -- @pnpm//:pnpm --dir $PWD install | |
| tar cfz ~/artifacts/node_modules.tar.gz node_modules | |
| - name: Save artifacts | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: artifacts | |
| path: ~/artifacts | |
| - name: Test generated libraries | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: | | |
| set -ex | |
| unzip ~/artifacts/outputs.zip -d library | |
| for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do | |
| echo "--- Testing library $lib ---" | |
| cd library/.test-out-$lib | |
| npm install | |
| npm test | |
| npm run fix | |
| rm -rf build | |
| npm run compile | |
| npm run system-test | |
| npm run docs | |
| cd ../.. | |
| done | |
| - name: Test generated ESM libraries | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: | | |
| set -ex | |
| for lib in showcase kms translate monitoring dlp texttospeech showcase-legacy compute logging bigquery-v2 redis retail; do | |
| echo "--- Testing ESM library $lib ---" | |
| cd library/.test-out-$lib-esm | |
| npm install | |
| npm test | |
| npm run fix | |
| rm -rf build | |
| npm run compile | |
| npm run system-test | |
| cd ../.. | |
| done | |
| - name: Test combined library (Speech) | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| env: | |
| TEST_ENV_DESTINATION_PATH: generator/gapic-generator-typescript/test-fixtures/google-cloud-speech | |
| 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 "" | |
| - name: Run tests for combined library (Speech) | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: | | |
| set -ex | |
| cd generator/gapic-generator-typescript/test-fixtures/google-cloud-speech | |
| npm install | |
| npm test | |
| npm run system-test | |
| - name: Test combined library (Tasks) | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| env: | |
| TEST_ENV_DESTINATION_PATH: generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks | |
| 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 "" | |
| - name: Run tests for combined library (Tasks) | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: | | |
| set -ex | |
| cd generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks | |
| npm install | |
| npm test | |
| npm run system-test | |