Skip to content

Commit

Permalink
Check runtime schemas (#326)
Browse files Browse the repository at this point in the history
* ci: add workflow

* ci: add script
  • Loading branch information
jkoenig134 authored Nov 12, 2024
1 parent 0def211 commit beb8016
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .ci/checkGitDiff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -e

diff="$(git diff --name-only)"
if [[ "$diff" ]]; then
echo 'These files changed when running the command:'
echo "$diff" | sed 's/^/* /'

exit 1
fi
22 changes: 22 additions & 0 deletions .github/workflows/check-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check Runtime Schemas

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
check-runtime-schemas:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: current
- run: npm ci
- run: npm run build:node
- run: npm run build:schemas --workspace=@nmshd/runtime
- name: Check git diff
run: bash .ci/checkGitDiff.sh

0 comments on commit beb8016

Please sign in to comment.