Skip to content

fix: improve error reporting when retrieving the element (#845) #2351

fix: improve error reporting when retrieving the element (#845)

fix: improve error reporting when retrieving the element (#845) #2351

Workflow file for this run

name: Check code before submitting
permissions: read-all
on:
merge_group:
push:
branches:
- main
pull_request:
jobs:
check-format:
name: '[Required] Check correct format'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: npm
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Run format check
run: npm run check-format
check-docs:
name: '[Required] Check docs updated'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 2
- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: npm
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Generate documents
run: npm run docs
- name: Check if autogenerated docs differ
run: |
diff_file=$(mktemp doc_diff_XXXXXX)
git diff --color > $diff_file
if [[ -s $diff_file ]]; then
echo "Please update the documentation by running 'npm run generate-docs'. The following was the diff"
cat $diff_file
rm $diff_file
exit 1
fi
rm $diff_file