@@ -136,12 +136,10 @@ jobs:
136136# run: pnpm install
137137
138138 - name : Prepare bundles
139- if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')
140139 working-directory : apps/demos
141140 run : pnpx nx prepare-bundles
142141
143142 - name : Demos - Run tsc
144- if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')
145143 working-directory : apps/demos
146144 run : tsc --noEmit
147145
@@ -164,22 +162,12 @@ jobs:
164162
165163 - name : Get changed files
166164 uses : DevExpress/github-actions/get-changed-files@v1
165+ if : github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
167166 with :
168167 gh-token : ${{ secrets.GITHUB_TOKEN }}
169168 paths : ' apps/demos/Demos/**/*'
170169 output : apps/demos/changed-files.json
171170
172- - name : Display changed files
173- run : |
174- if [ -f "apps/demos/changed-files.json" ]; then
175- echo "Found changed-files.json"
176- echo "Content of changed-files.json:"
177- cat apps/demos/changed-files.json
178- echo "Number of changed files: $(jq length apps/demos/changed-files.json)"
179- else
180- echo "changed-files.json not found"
181- fi
182-
183171 - name : Upload artifacts
184172 uses : actions/upload-artifact@v4
185173 with :
@@ -275,6 +263,7 @@ jobs:
275263 uses : actions/checkout@v4
276264
277265 - name : Download artifacts
266+ if : github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
278267 uses : actions/download-artifact@v4
279268 with :
280269 name : changed-demos
@@ -316,78 +305,47 @@ jobs:
316305 - name : Install tgz
317306 run : pnpm add -w ./devextreme-installer.tgz ./devextreme-dist-installer.tgz ./devextreme-react-installer.tgz ./devextreme-vue-installer.tgz ./devextreme-angular-installer.tgz
318307
319- - name : Run lint on all demos
320- if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')
321- working-directory : apps/demos
322- env :
323- DEBUG : ' eslint:cli-engine,stylelint:standalone'
324- run : ${{ matrix.command }}
308+ - uses : actions/setup-dotnet@v4
309+ with :
310+ dotnet-version : 5.0.408
325311
326- - name : Run lint on changed demos
327- if : github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
328- working-directory : apps/demos
329- env :
330- DEBUG : ' eslint:cli-engine,stylelint:standalone'
312+ - name : Prepare dotnet
331313 run : |
332- pnpx nx lint-non-demos
333-
334- if [ -f "changed-files.json" ]; then
335- echo "Running lint-demos on changed files"
336- CHANGED_DEMOS=$(jq -r '.[].filename' changed-files.json | grep '^apps/demos/Demos/' | sed 's|^apps/demos/||' | tr '\n' ' ')
337- if [ ! -z "$CHANGED_DEMOS" ]; then
338- echo "Changed demo files: $CHANGED_DEMOS"
339- pnpx eslint $CHANGED_DEMOS
340- else
341- echo "No demo files changed, skipping lint-demos"
342- fi
343- else
344- echo "changed-files.json not found"
345- pnpm run lint-demos
346- fi
314+ dotnet new globaljson --sdk-version 5.0.408
315+ dotnet tool install -g dotnet-format --version 5.1.225507
347316
348- - name : Run lint on changed demos
349- if : github.event_name != 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
317+ - name : Run lint
350318 working-directory : apps/demos
351319 env :
320+ CHANGEDFILEINFOSPATH : changed-files.json
352321 DEBUG : ' eslint:cli-engine,stylelint:standalone'
353- run : |
354- pnpx nx lint-non-demos
355-
356- if [ -f "changed-files.json" ]; then
357- echo "Running lint-demos on changed files"
358- CHANGED_DEMOS=$(jq -r '.[].filename' changed-files.json | grep '^apps/demos/Demos/' | sed 's|^apps/demos/||' | tr '\n' ' ')
359- if [ ! -z "$CHANGED_DEMOS" ]; then
360- echo "Changed demo files: $CHANGED_DEMOS"
361- pnpx eslint $CHANGED_DEMOS
362- else
363- echo "No demo files changed, skipping lint-demos"
364- fi
322+ run : ${{ matrix.command }}
365323
366324 check_generated_demos :
367325 name : ${{ matrix.name }}
368326 runs-on : ubuntu-22.04
369327 timeout-minutes : 10
370- needs :
371- - build-devextreme
372- - get-changes
328+ needs : build-demos
373329
374330 strategy :
375331 fail-fast : false
376332 matrix :
377333 include :
378- - name : Check generated demos
379- command : pnpm run convert-to-js
334+ - name : Check generated demos (1/5)
335+ command : CONSTEL=1/5 pnpm run convert-to-js
336+ - name : Check generated demos (2/5)
337+ command : CONSTEL=2/5 pnpm run convert-to-js
338+ - name : Check generated demos (3/5)
339+ command : CONSTEL=3/5 pnpm run convert-to-js
340+ - name : Check generated demos (4/5)
341+ command : CONSTEL=4/5 pnpm run convert-to-js
342+ - name : Check generated demos (5/5)
343+ command : CONSTEL=5/5 pnpm run convert-to-js
380344
381345 steps :
382346 - name : Get sources
383347 uses : actions/checkout@v4
384348
385- - name : Download artifacts
386- uses : actions/download-artifact@v4
387- with :
388- name : changed-demos
389- path : apps/demos
390-
391349 - uses : pnpm/action-setup@v3
392350 with :
393351 version : 9
@@ -399,6 +357,21 @@ jobs:
399357 node-version : ' 20'
400358 cache : ' pnpm'
401359
360+ # - name: Get pnpm store directory
361+ # shell: bash
362+ # run: |
363+ # echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
364+ #
365+ # - uses: actions/cache@v4
366+ # name: Setup pnpm cache
367+ # with:
368+ # path: |
369+ # ${{ env.STORE_PATH }}
370+ # .nx/cache
371+ # key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
372+ # restore-keys: |
373+ # ${{ runner.os }}-pnpm-store
374+
402375 - name : Download devextreme sources
403376 uses : actions/download-artifact@v4
404377 with :
@@ -415,37 +388,10 @@ jobs:
415388 working-directory : apps/demos
416389 run : pnpm run prepare-js
417390
418- - name : Download changed demos info
419- uses : actions/download-artifact@v4
420- with :
421- name : changed-demos
422- path : apps/demos
423-
424391 - name : Check generated JS demos
425392 working-directory : apps/demos
426393 run : |
427- if [ -f "changed-files.json" ]; then
428- echo "Running convert-to-js on changed files only"
429-
430- CHANGED_DEMOS=$(jq -r '.[].filename' changed-files.json | grep '/React/' | grep '\.tsx$' | sed 's|^apps/demos/||' | sed 's|/[^/]*\.tsx$||' | sort | uniq)
431-
432- if [ -z "$CHANGED_DEMOS" ]; then
433- echo "No React demos found in changed files, skipping conversion"
434- else
435- echo "Changed React demos:"
436- echo "$CHANGED_DEMOS"
437-
438- echo "$CHANGED_DEMOS" | while read -r demo_dir; do
439- if [ ! -z "$demo_dir" ]; then
440- echo "Converting: $demo_dir"
441- pnpm run convert-to-js "$demo_dir"
442- fi
443- done
444- fi
445- else
446- echo "Running convert-to-js on all files"
447- ${{ matrix.command }}
448- fi
394+ ${{ matrix.command }}
449395
450396 git add ./Demos -N
451397
@@ -459,7 +405,6 @@ jobs:
459405
460406 testcafe :
461407 needs : build-demos
462- if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')
463408 strategy :
464409 fail-fast : false
465410 matrix :
@@ -491,6 +436,7 @@ jobs:
491436 name : devextreme-sources
492437
493438 - name : Download artifacts
439+ if : github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
494440 uses : actions/download-artifact@v4
495441 with :
496442 name : changed-demos
@@ -523,6 +469,9 @@ jobs:
523469 working-directory : apps/demos
524470 run : pnpm add ../../devextreme-installer.tgz ../../devextreme-dist-installer.tgz ../../devextreme-react-installer.tgz ../../devextreme-vue-installer.tgz ../../devextreme-angular-installer.tgz
525471
472+ # - name: Build wrappers
473+ # run: pnpm exec nx run-many -t pack -p devextreme-angular devextreme-react devetreme-vue
474+
526475 - name : Prepare JS
527476 working-directory : apps/demos
528477 run : pnpm run prepare-js
0 commit comments