Skip to content

impl(generator): configurable packages for Rust codec #340

impl(generator): configurable packages for Rust codec

impl(generator): configurable packages for Rust codec #340

Workflow file for this run

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Rust SDK
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
rust-version: ['1.81', '1.70']
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo
key: ${{ github.job }}-${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: Setup Rust ${{ matrix.rust-version }}
run: rustup toolchain install ${{ matrix.rust-version }}
- name: Display Cargo version
run: cargo version
- name: Display rustc version
run: rustc --version
# TODO(#92) - disable the doc tests because the generated code contains non-rusty blockquotes
- run: cargo test --lib --bins --tests
- run: cargo test --package types --package google-cloud-auth --package check-copyright
lint:
runs-on: ubuntu-24.04
strategy:
matrix:
rust-version: ['1.81']
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo
key: ${{ github.job }}-${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: Setup Rust ${{ matrix.rust-version }}
run: rustup toolchain install ${{ matrix.rust-version }}
- name: Display Cargo version
run: cargo version
- name: Display rustc version
run: rustc --version
- run: cargo clippy --fix
- run: cargo fmt
- run: git diff --exit-code