From ddaf968028e51d6291c2ff906b58696710496caf Mon Sep 17 00:00:00 2001 From: VasilevNStas Date: Fri, 26 Jun 2026 13:40:21 +0300 Subject: [PATCH] fix: #3 add buf CI workflow for lint and breaking checks Adds a GitHub Actions workflow that runs buf lint and buf breaking on every pull request against master. Also adds a minimal buf.yaml with STANDARD lint rules (excluding those that fire on the existing codebase: ENUM_VALUE_PREFIX, ENUM_ZERO_VALUE_SUFFIX, FIELD_NOT_REQUIRED, PACKAGE_DIRECTORY_MATCH, PACKAGE_VERSION_SUFFIX). Breaking changes are checked at the FILE level, so any incompatible modification to an existing message, field, or enum is caught before merge. Closes #3 --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ buf.yaml | 13 +++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 buf.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bccfbe1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 APN. +# SPDX-License-Identifier: MIT. + +name: ci +on: + pull_request: + branches: [master] + push: + branches: [master] +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: bufbuild/buf-setup-action@v1 + - run: buf lint + breaking: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: bufbuild/buf-setup-action@v1 + - run: buf breaking --against '.git#branch=master' diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 0000000..43dfc33 --- /dev/null +++ b/buf.yaml @@ -0,0 +1,13 @@ +version: v2 +lint: + use: + - STANDARD + except: + - ENUM_VALUE_PREFIX + - ENUM_ZERO_VALUE_SUFFIX + - FIELD_NOT_REQUIRED + - PACKAGE_DIRECTORY_MATCH + - PACKAGE_VERSION_SUFFIX +breaking: + use: + - FILE