Skip to content

Add workflow for build aspnet demos #4112

Add workflow for build aspnet demos

Add workflow for build aspnet demos #4112

Workflow file for this run

name: Lint
concurrency:
group: wf-${{github.event.pull_request.number || github.sha}}-${{github.workflow}}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- "[0-9][0-9]_[0-9]"
jobs:
package_lock:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Get sources
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Check package-lock
run: |
node -v
npm -v
npm install --no-audit --no-fund --ignore-scripts
git diff --exit-code package-lock.json
check_generated_demos:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Get sources
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Restore npm cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-modules
- name: Check generated JS demos
run: |
npm install --no-audit --no-fund --ignore-scripts
git reset --hard
npm run convert-to-js ./JSDemos/Demos/**/React
git add ./JSDemos/Demos -N
if git diff --exit-code ; then
echo "Generated JS demos are up-to-date"
else
echo "Generated JS demos are outdated. Execute 'npm run convert-to-js ./JSDemos/Demos/**/React' and commit changes."
echo "If you see another diff, ensure that extra listed files have LF endings."
exit 1
fi