Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI action to ensure schema conformity on incoming PRs #7

Merged
merged 5 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/ci-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
branches:
- develop
pull_request:
branches:
- master
- develop
types: [opened, reopened, synchronize]
workflow_call:
workflow_dispatch:

name: ci-verify

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: new

- name: Checkout current master
uses: actions/checkout@v4
with:
ref: master
path: master

- name: Download latest flatc g++ binary
uses: robinraju/[email protected]
with:
repository: "google/flatbuffers"
latest: true
fileName: "Linux.flatc.binary.g++*.zip"
extract: true
# Disabling the default wildcards (*.tar.gz, *.zip)
tarBall: false
zipBall: false

- name: Compare specified .fbs files for conformity
run: |
# Return early if any one of the conformity checks fail
set -e
# Set executable flag
chmod u+x ./flatc

while IFS= read -r file; do
# ignore blank lines
[[ -z "$file" ]] && continue

./flatc "new/$file" --conform "master/$file"
done < ./new/.github/workflows/verify-list
5 changes: 5 additions & 0 deletions .github/workflows/verify-list
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
HubConfig.fbs
HubToGatewayMessage.fbs
GatewayToHubMessage.fbs
HubToLocalMessage.fbs
LocalToHubMessage.fbs
Loading