Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/actions/run-unit-tests/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,36 @@ runs:
with:
node-version: ${{ inputs.node-version }}
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install Workspace Dependencies (Frozen Lockfile)
run: |
if ! pnpm install --frozen-lockfile --ignore-scripts; then
echo "::error title=PNPM Lockfile Out of Date::The pnpm-lock.yaml file is out of sync with workspace package.json dependencies."
echo ""
echo "===================================================================================================="
echo "❌ PNPM Lockfile Out of Date (ERR_PNPM_OUTDATED_LOCKFILE)"
echo ""
echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml."
echo ""
echo "To resolve this failure, please update the lockfile locally and commit the result:"
echo " pnpm install --no-frozen-lockfile"
echo " git add pnpm-lock.yaml"
echo " git commit -m \"chore: update pnpm-lock.yaml\""
echo " git push"
echo "===================================================================================================="
echo ""
exit 1
fi
shell: bash
- name: Cache Turborepo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
version: ^10.0.0
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Compile Workspace (Turborepo Caching)
run: pnpm run compile
shell: bash
- run: node --version
shell: bash
- name: Run unit tests
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/bigtable-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ jobs:
with:
go-version: '>=1.20.2'
- run: chmod +x .kokoro/conformance.sh
- run: npm install
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install Workspace Dependencies (Frozen Lockfile)
run: |
if ! pnpm install --frozen-lockfile --ignore-scripts; then
echo "::error title=PNPM Lockfile Out of Date::The pnpm-lock.yaml file is out of sync with workspace package.json dependencies."
echo ""
echo "===================================================================================================="
echo "❌ PNPM Lockfile Out of Date (ERR_PNPM_OUTDATED_LOCKFILE)"
echo ""
echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml."
echo ""
echo "To resolve this failure, please update the lockfile locally and commit the result:"
echo " pnpm install --no-frozen-lockfile"
echo " git add pnpm-lock.yaml"
echo " git commit -m \"chore: update pnpm-lock.yaml\""
echo " git push"
echo "===================================================================================================="
echo ""
exit 1
fi
- run: pnpm --filter ...{handwritten/bigtable} run --if-present compile
- run: go version
- run: .kokoro/conformance.sh
25 changes: 23 additions & 2 deletions .github/workflows/continuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,30 @@ jobs:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
version: ^7.0.0
node-version: ${{ matrix.node }}
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install Workspace Dependencies (Frozen Lockfile)
run: |
if ! pnpm install --frozen-lockfile --ignore-scripts; then
echo "::error title=PNPM Lockfile Out of Date::The pnpm-lock.yaml file is out of sync with workspace package.json dependencies."
echo ""
echo "===================================================================================================="
echo "❌ PNPM Lockfile Out of Date (ERR_PNPM_OUTDATED_LOCKFILE)"
echo ""
echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml."
echo ""
echo "To resolve this failure, please update the lockfile locally and commit the result:"
echo " pnpm install --no-frozen-lockfile"
echo " git add pnpm-lock.yaml"
echo " git commit -m \"chore: update pnpm-lock.yaml\""
echo " git push"
echo "===================================================================================================="
echo ""
exit 1
fi
- run: node --version
- run: ci/run_conditional_tests.sh
name: Run unit tests
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/discovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@ jobs:
contents: read
issues: write # Added for creating issues on failure
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually suprised zizmor doesn't complain about this. We went in the opposite direction in https://github.com/googleapis/google-cloud-node/pull/8993/changes because of a failed zizmor CI check.

with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: ^10.0.0

# Install all deps, including dev dependencies.
- run: cd handwritten/bigquery && pnpm install
- run: cd handwritten/bigquery && pnpm install --filter .
# Generate types
- run: cd handwritten/bigquery && pnpm run types
# Fix formatting (scoped to generated types.d.ts and clean up untracked pnpm-lock.yaml)
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/generation_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ jobs:
- name: Setup pnpm
if: steps.changes.outputs.librarian == 'true' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: ^7.0.0
- name: Install tools
if: steps.changes.outputs.librarian == 'true' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
run: librarian install
Expand Down
66 changes: 41 additions & 25 deletions .github/workflows/generator-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,37 +84,53 @@ jobs:
working-directory: core/generator/gapic-generator-typescript
run: |
set -ex
npm install -g pnpm@10.0.0 --silent
cp ../../../.mocharc.cjs .
unzip ~/artifacts/outputs.zip -d library
FAIL=0
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 ../..
(
set -ex
echo "--- Testing library $lib ---"
cd library/.test-out-$lib
pnpm install --no-frozen-lockfile --silent
pnpm test
pnpm run compile
pnpm run system-test
) &
done
for job in $(jobs -p); do
wait "$job" || FAIL=1
done
if [ "$FAIL" -ne 0 ]; then
echo "Some library tests failed!"
exit 1
fi

- name: Test generated ESM libraries
working-directory: core/generator/gapic-generator-typescript
run: |
set -ex
cp ../../../.mocharc.cjs .
FAIL=0
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 ../..
(
set -ex
echo "--- Testing ESM library $lib ---"
cd library/.test-out-$lib-esm
pnpm install --no-frozen-lockfile --silent
pnpm test
pnpm run compile
pnpm run system-test
) &
done
for job in $(jobs -p); do
wait "$job" || FAIL=1
done
if [ "$FAIL" -ne 0 ]; then
echo "Some ESM library tests failed!"
exit 1
fi
- name: Test combined library (Speech)
if: steps.generator-changes.outputs.changes == 'true'
env:
Expand All @@ -126,9 +142,9 @@ jobs:
run: |
set -ex
cd generator/gapic-generator-typescript/test-fixtures/google-cloud-speech
npm install
npm test
npm run system-test
pnpm install --no-frozen-lockfile --silent
pnpm test
pnpm run system-test

- name: Test combined library (Tasks)
if: steps.generator-changes.outputs.changes == 'true'
Expand All @@ -141,6 +157,6 @@ jobs:
run: |
set -ex
cd generator/gapic-generator-typescript/test-fixtures/google-cloud-tasks
npm install
npm test
npm run system-test
pnpm install --no-frozen-lockfile --silent
pnpm test
pnpm run system-test
22 changes: 21 additions & 1 deletion .github/workflows/mandatory-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ jobs:
with:
go-version: '>=1.20.2'
- run: chmod +x .kokoro/mandatory-conformance.sh
- run: npm install
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install Workspace Dependencies (Frozen Lockfile)
run: |
if ! pnpm install --frozen-lockfile --ignore-scripts; then
echo "::error title=PNPM Lockfile Out of Date::The pnpm-lock.yaml file is out of sync with workspace package.json dependencies."
echo ""
echo "===================================================================================================="
echo "❌ PNPM Lockfile Out of Date (ERR_PNPM_OUTDATED_LOCKFILE)"
echo ""
echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml."
echo ""
echo "To resolve this failure, please update the lockfile locally and commit the result:"
echo " pnpm install --no-frozen-lockfile"
echo " git add pnpm-lock.yaml"
echo " git commit -m \"chore: update pnpm-lock.yaml\""
echo " git push"
echo "===================================================================================================="
echo ""
exit 1
fi
- run: pnpm --filter ...{handwritten/bigtable} run --if-present compile
- run: go version
- run: .kokoro/mandatory-conformance.sh
30 changes: 27 additions & 3 deletions .github/workflows/presubmit-bun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,35 @@ jobs:
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: ${{ matrix.node-version }}
# We continue to use PNPM (rather than Bun) for installation for consistent
# lockfile/version management between CI/runtimes.
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install Workspace Dependencies (Frozen Lockfile)
run: |
if ! pnpm install --frozen-lockfile --ignore-scripts; then
echo "::error title=PNPM Lockfile Out of Date::The pnpm-lock.yaml file is out of sync with workspace package.json dependencies."
echo ""
echo "===================================================================================================="
echo "❌ PNPM Lockfile Out of Date (ERR_PNPM_OUTDATED_LOCKFILE)"
echo ""
echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml."
echo ""
echo "To resolve this failure, please update the lockfile locally and commit the result:"
echo " pnpm install --no-frozen-lockfile"
echo " git add pnpm-lock.yaml"
echo " git commit -m \"chore: update pnpm-lock.yaml\""
echo " git push"
echo "===================================================================================================="
echo ""
exit 1
fi
- name: Cache Turborepo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
version: ^10.0.0
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Compile Workspace (Turborepo Caching)
run: pnpm run compile
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14
Expand Down
30 changes: 29 additions & 1 deletion .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,35 @@ jobs:
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 24
- run: npm install
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install Workspace Dependencies (Frozen Lockfile)
run: |
if ! pnpm install --frozen-lockfile --ignore-scripts; then
echo "::error title=PNPM Lockfile Out of Date::The pnpm-lock.yaml file is out of sync with workspace package.json dependencies."
echo ""
echo "===================================================================================================="
echo "❌ PNPM Lockfile Out of Date (ERR_PNPM_OUTDATED_LOCKFILE)"
echo ""
echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml."
echo ""
echo "To resolve this failure, please update the lockfile locally and commit the result:"
echo " pnpm install --no-frozen-lockfile"
echo " git add pnpm-lock.yaml"
echo " git commit -m \"chore: update pnpm-lock.yaml\""
echo " git push"
echo "===================================================================================================="
echo ""
exit 1
fi
- name: Cache Turborepo
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- name: Compile Workspace (Turborepo Caching)
run: pnpm run compile
- run: node ./bin/linter.mjs --strict
name: Run monorepo linter
env:
Expand Down
28 changes: 24 additions & 4 deletions .github/workflows/storage-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,32 @@ jobs:
conformance-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- run: node --version
- run: cd handwritten/storage && npm install
- run: cd handwritten/storage && npm run conformance-test
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: Install Workspace Dependencies (Frozen Lockfile)
run: |
if ! pnpm install --frozen-lockfile --ignore-scripts; then
echo "::error title=PNPM Lockfile Out of Date::The pnpm-lock.yaml file is out of sync with workspace package.json dependencies."
echo ""
echo "===================================================================================================="
echo "❌ PNPM Lockfile Out of Date (ERR_PNPM_OUTDATED_LOCKFILE)"
echo ""
echo "One or more package.json files have changed or were merged without updating pnpm-lock.yaml."
echo ""
echo "To resolve this failure, please update the lockfile locally and commit the result:"
echo " pnpm install --no-frozen-lockfile"
echo " git add pnpm-lock.yaml"
echo " git commit -m \"chore: update pnpm-lock.yaml\""
echo " git push"
echo "===================================================================================================="
echo ""
exit 1
fi
- run: pnpm --filter ...{handwritten/storage} run --if-present compile
- run: cd handwritten/storage && pnpm run conformance-test
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ packages/*/AUTHORS
packages/*/CONTRIBUTORS
packages/*/COPYING
package-lock.json
yarn.lock
bun.lockb
bun.lock
**/pnpm-lock.yaml
!/pnpm-lock.yaml
__pycache__
packages/*/pnpm-lock.yaml
containers/*/pnpm-lock.yaml
**/docs.metadata
**/backstory/
*.tsbuildinfo
.turbo
2 changes: 1 addition & 1 deletion .mocharc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
const config = {
"enable-source-maps": true,
"throw-deprecation": true,
"timeout": 10000,
"timeout": 60000,
"parallel": true,
"recursive": true
}
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
link-workspace-packages=false
Loading
Loading