Implement a strictly typed service client for comms between services #9
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
# 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 |