Skip to content

Update google provider types #1646

Update google provider types

Update google provider types #1646

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
typed-boundary:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- name: Fetch base branch
run: git fetch --no-tags --prune --depth=1 origin "${{ github.base_ref }}"
- name: Install ripgrep
run: |
sudo apt-get update
sudo apt-get install -y ripgrep
- name: Enforce typed boundary invariant
run: make typed-boundary-check-branch BASE=origin/${{ github.base_ref }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Rust
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
with:
components: rustfmt, clippy
- name: Install cargo-machete
run: cargo install cargo-machete --version 0.9.2 --locked
- name: Cache cargo registry
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install protobuf compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Check formatting
run: cargo fmt --all -- --check
- name: Check unused dependencies
run: cargo machete
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
env:
RUSTFLAGS: "-D warnings"
run: cargo build --verbose
- name: Run tests
env:
RUSTFLAGS: "-D warnings"
run: cargo test --verbose
- name: Check generated TypeScript types are up to date
run: |
# Generate types (happens during test compilation via ts-rs)
cargo test --lib --no-run --quiet
# Check for any differences
if ! git diff --exit-code bindings/typescript/src/generated/; then
echo "❌ Generated TypeScript types are out of date!"
echo "Please run 'make generate-types' and commit the changes."
exit 1
fi
echo "✅ Generated TypeScript types are up to date"
cross-transformation-coverage:
uses: ./.github/workflows/cross-transformation-coverage.yml
test-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Rust
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20'
- name: Install pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 10
- name: Test provider type workflow helpers
run: >-
node --test
.github/scripts/braintrust-provider-types.test.mjs
.github/scripts/provider-type-update-plan.test.mjs
.github/scripts/provider-type-update-workflow.test.mjs
- name: Cache cargo registry
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install protobuf compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Install WASM build tools
run: make install-wasm-tools
- name: Install binaryen (wasm-opt)
run: |
wget https://github.com/WebAssembly/binaryen/releases/download/version_119/binaryen-version_119-x86_64-linux.tar.gz
tar -xzf binaryen-version_119-x86_64-linux.tar.gz
sudo cp binaryen-version_119/bin/wasm-opt /usr/local/bin/
rm -rf binaryen-version_119*
- name: Build TypeScript bindings
run: make typescript
- name: Run TypeScript type checking
run: cd bindings/typescript && pnpm run typecheck
- name: Run TypeScript tests
run: make test-typescript
- name: Install payloads dependencies
run: cd payloads && pnpm install
- name: Run payloads tests
run: cd payloads && pnpm test
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Rust
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- name: Cache cargo registry
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install protobuf compiler
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Set up uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
- name: Build Python bindings
run: make python
- name: Run Python tests
run: make test-python