-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch enables CI for proto files.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '**' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
# Update of a developer branch cancels the previously scheduled workflow | ||
# run for this branch. However, the 'master' branch and tag workflow runs | ||
# are never canceled. | ||
# | ||
# We use a trick here: define the concurrency group as 'workflow run ID' + | ||
# 'workflow run attempt' because it is a unique combination for any run. | ||
# So it effectively discards grouping. | ||
# | ||
# Important: we cannot use `github.sha` as a unique identifier because | ||
# pushing a tag may cancel a run that works on a branch push event. | ||
group: ${{ ( | ||
github.ref == 'refs/heads/master' || | ||
startsWith(github.ref, 'refs/tags/') ) && | ||
format('{0}-{1}', github.run_id, github.run_attempt) || | ||
format('{0}-{1}', github.workflow, github.ref) }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
protobuf: | ||
runs-on: ubuntu-20.04-self-hosted | ||
container: | ||
image: docker.io/tarantool/testing:ubuntu-focal | ||
|
||
steps: | ||
- name: Prepare checkout | ||
uses: tarantool/actions/prepare-checkout@master | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install clang-format | ||
run: | | ||
apt-get update | ||
apt-get -y install clang-format | ||
- name: Checking protobuf syntax | ||
run: clang-format --dry-run --verbose -Werror *.proto |