add error response callback #128
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
name: build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- run: yarn install --immutable --immutable-cache --check-cache | |
- run: yarn lint | |
- run: yarn build | |
- name: Compare the expected and actual dist/ directories | |
run: | | |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | |
echo "The dist/ directory is out of date. Please run 'yarn build' and commit the changes." | |
echo "See status below:" | |
git diff | |
exit 1 | |
fi | |
build-api: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- run: yarn install --immutable --immutable-cache --check-cache | |
- run: yarn generate | |
- name: Compare the expected and generated types | |
run: | | |
if [ "$(git diff --ignore-space-at-eol index.d.ts | wc -l)" -gt "0" ]; then | |
echo "The types definitions are out of date. Please run 'yarn generate' and commit the changes." | |
echo "See status below:" | |
git diff | |
exit 1 | |
fi |