Skip to content

chore(deps): update google/oss-fuzz digest to 4e65aea #8310

chore(deps): update google/oss-fuzz digest to 4e65aea

chore(deps): update google/oss-fuzz digest to 4e65aea #8310

Workflow file for this run

on:
- pull_request
permissions:
contents: read
name: CI
jobs:
build:
strategy:
matrix:
go-version: [oldstable, stable]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: go build ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
check-latest: true
- run: go test ./...
node_test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 22
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
check-latest: true
- run: >
cd examples/internal/browser &&
npm install gulp-cli &&
npm install &&
./node_modules/.bin/gulp
generate:
container:
image: ghcr.io/grpc-ecosystem/grpc-gateway/build-env:latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# Required with newer versions of Git
# https://github.com/actions/checkout/issues/766
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: make install
- run: make clean
- run: make generate
- run: go mod tidy
- run: git add -N . && git diff --exit-code
bazel:
container:
image: ghcr.io/grpc-ecosystem/grpc-gateway/build-env:latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /home/vscode/.cache/_grpc_gateway_bazel
key: v2-bazel-output-${{ hashFiles('.bazelversion', 'MODULE.bazel.lock', 'repositories.bzl') }}
restore-keys: |
v2-bazel-output-${{ hashFiles('.bazelversion') }}-
v2-bazel-output-
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: /home/vscode/.cache/bazel_repo
key: v2-bazel-repo-${{ hashFiles('.bazelversion', 'MODULE.bazel.lock', 'repositories.bzl') }}
restore-keys: |
v2-bazel-repo-${{ hashFiles('.bazelversion') }}-
v2-bazel-repo-
# Required with newer versions of Git
# https://github.com/actions/checkout/issues/766
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Configure bazel
run:
| # put .bazelrc in $HOME so that it's read before project's .bazelrc
cat > /home/vscode/.bazelrc << EOF
startup --output_base=/home/vscode/.cache/_grpc_gateway_bazel
build --repository_cache=/home/vscode/.cache/bazel_repo
build --@io_bazel_rules_go//go/config:race
# Workaround https://github.com/bazelbuild/bazel/issues/3645
# See https://docs.bazel.build/versions/0.23.0/command-line-reference.html
build --local_ram_resources=7168 # Github runners have 7G of memory
build --local_cpu_resources=2 # Github runners have 2 vCPU
EOF
- name: Check that Bazel BUILD files are up-to-date
run: bazel run //:gazelle && git add -N . && git diff --exit-code
- name: Check that repositories.bzl is up-to-date
run: |
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories &&
git add -N . && git diff --exit-code
- name: Check formatting of Bazel BUILD files
run: bazel run //:buildifier && git add -N . && git diff --exit-code
- name: Run tests with Bazel
run: bazel test //...
gorelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
check-latest: true
- run: go tool gorelease -base=v2.30.0
proto_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
check-latest: true
- run: make install
- run: PATH=$PATH:~/go/bin buf build
- run: PATH=$PATH:~/go/bin buf lint
- run: PATH=$PATH:~/go/bin buf format -w && git add -N . && git diff --exit-code
- run: PATH=$PATH:~/go/bin buf breaking --path protoc-gen-openapiv2/ --against 'https://github.com/grpc-ecosystem/grpc-gateway.git#branch=main'
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
check-latest: true
- run: go tool staticcheck ./...
fuzz:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@4e65aea32254fe988ac4b84dbb088d2d08d789e7 # master
with:
oss-fuzz-project-name: "grpc-gateway"
dry-run: false
language: go
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@4e65aea32254fe988ac4b84dbb088d2d08d789e7 # master
with:
oss-fuzz-project-name: "grpc-gateway"
fuzz-seconds: 600
dry-run: false
language: go
- name: Upload Crash
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts