Skip to content

feat: add error index reporting for source hydration stage #28163

feat: add error index reporting for source hydration stage

feat: add error index reporting for source hydration stage #28163

Workflow file for this run

name: verify
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
permissions:
contents: read # Required for actions/checkout
jobs:
generate:
name: Correct generated files
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
- run: go version
- run: go mod tidy
- run: git diff --exit-code go.mod
- name: Error message
if: ${{ failure() }}
run: echo '::error file=go.mod,line=1,col=1::Inconsistent go mod file. Ensure you have run `go mod tidy` and committed the files locally.'; echo '::error file=enterprise_mod.go,line=1,col=1::Possible missing enterprise exclusive dependencies.'
- run: make mocks
- run: git diff --exit-code
- name: Error message
if: ${{ failure() }}
run: echo '::error file=Makefile,line=11,col=1::Incorrectly generated files. Ensure you have run `make mocks` and committed the files locally.'
- name: install protoc compiler
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
version: '25.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: make proto
- run: git diff -I '^\/\/\s+-?\s+protoc\s+v' --exit-code ## Ignore protoc version comment
- name: Error message
if: ${{ failure() }}
run: echo 'proto files are not generated correctly. Ensure you have run `make proto` and committed the files locally.'
- run: git checkout proto ## cleanup tree due to protoc version comment
- run: make fmt
- run: git diff --exit-code
- name: Error message
if: ${{ failure() }}
run: echo 'Not formatted files. Ensure you have run `make fmt` and committed the files locally.'
- name: Validate OpenAPI definition
uses: char0n/apidom-validate@248675e12929bb9b55eff78e9f5ea1a0844a083d # v1.2.0
with:
definition-file: gateway/openapi.yaml
- name: Login to Docker Hub
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
username: ${{ vars.DOCKERHUB_READONLY_USERNAME }}
password: ${{ secrets.DOCKERHUB_READONLY_TOKEN }}
- run: make generate-openapi-spec
- run: git diff --exit-code
- name: Error message
if: ${{ failure() }}
run: echo 'Not correctly generated openapi spec. Ensure you have run `make generate-openapi-spec` and committed the files locally.'
linting:
name: lint
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: v2.5.0
args: -v