-
Notifications
You must be signed in to change notification settings - Fork 73
38 lines (31 loc) · 1.25 KB
/
check-schema-definitions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#
# OpenCRVS is also distributed under the terms of the Civil Registration
# & Healthcare Disclaimer located at http://opencrvs.org/license.
#
# Copyright (C) The OpenCRVS Authors located at https://github.com/opencrvs/opencrvs-core/blob/master/AUTHORS.
name: Ensure API schema definitions are up-to-date
on: [pull_request]
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Install dependencies
run: yarn install && yarn dev:secrets:gen
- name: Generate schema definitions
run: cd packages/commons && bash generate-api-types.sh
- name: Verify no changed files in git
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "There are changes in the git repository. Stopping pipeline."
echo "Ensure the GraphQL types and internal API JSON schemas are generated properly"
exit 1
fi