refactor: introduce HttpResponseException and update factories #861
Workflow file for this run
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
| # Copyright 2025 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. | |
| permissions: read-all | |
| # Run on PRs and pushes to the default branch. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # We use a specific Dart SDK version here in order to have hermetic, | |
| # reproducable builds (formatting can change between SDK versions, ...). | |
| env: | |
| DART_VERSION: 3.9.2 | |
| GOOGLE_CLOUD_PROJECT: skilful-orb-203421 | |
| LIBRARIAN_VERSION: v0.8.4-0.20260319214857-70b3cca2e8e2 | |
| name: Dart Checks | |
| jobs: | |
| analyze_and_format: | |
| name: Analyze and Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | |
| with: | |
| sdk: ${{ env.DART_VERSION }} | |
| - run: dart pub get | |
| - name: Analyze | |
| run: dart analyze --fatal-infos | |
| - name: Format | |
| run: dart format --output=none --set-exit-if-changed . | |
| unit_tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| platform: ["chrome", "vm"] | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | |
| with: | |
| sdk: ${{ env.DART_VERSION }} | |
| - run: dart pub get | |
| - run: dart test -p ${{ matrix.platform }} . | |
| storage_testbench_tests: | |
| name: Storage Testbench Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | |
| with: | |
| sdk: ${{ env.DART_VERSION }} | |
| - run: dart pub get | |
| - run: docker run -d --rm -p 9000:9000 -p 8888:8888 gcr.io/cloud-devrel-public-resources/storage-testbench:latest | |
| - run: dart test -P storage-testbench . | |
| generator: | |
| name: Generators | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| - name: Install protoc | |
| run: | | |
| set -e | |
| curl -fSSL --retry 3 --retry-all-errors --retry-delay 15 -o /tmp/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-x86_64.zip | |
| cd /usr/local | |
| sudo unzip -x /tmp/protoc.zip | |
| protoc --version | |
| - name: Install Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 | |
| with: | |
| go-version: 1.26.1 | |
| - name: Install Dart # The generator uses "dart format". | |
| uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | |
| with: | |
| sdk: ${{ env.DART_VERSION }} | |
| - name: Setup Graphviz | |
| run: sudo apt-get install graphviz | |
| - run: dart pub get | |
| # Regenerate and check the existing clients. If there is any difference | |
| # between the generated code and the committed code that is an error; all | |
| # the inputs should be pinned, including the generator version and the | |
| # googleapis SHA. | |
| - name: Regenerate existing clients | |
| # The current head version of librarian can be generated with: | |
| # GOPROXY=direct go list -m -u -f '{{.Version}}' github.com/googleapis/librarian@main | |
| run: go run github.com/googleapis/librarian/cmd/librarian@${{ env.LIBRARIAN_VERSION }} generate -all | |
| - name: Format librarian configuration | |
| run: go run github.com/googleapis/librarian/cmd/librarian@${{ env.LIBRARIAN_VERSION }} tidy | |
| - name: Regenerate dependency graph | |
| run: dart run tool/deps_diagram.dart | |
| - name: Generated Diff | |
| run: git diff --exit-code | |
| - name: Upload dependency graph | |
| if: failure() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| with: | |
| name: Dependency graph | |
| path: deps.png | |
| retention-days: 1 |