Skip to content

Commit 577ad2c

Browse files
Demos: enable check all generated demos (#32061)
1 parent 702e554 commit 577ad2c

File tree

60 files changed

+203
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+203
-123
lines changed

.github/workflows/demos_visual_tests.yml

Lines changed: 85 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,19 +416,23 @@ jobs:
416416
pnpm run lint-demos
417417
fi
418418
419-
check-generated-demos:
420-
name: Check generated demos
419+
check-generated-demos-changed:
420+
name: Check generated demos (changed only)
421421
runs-on: devextreme-shr2
422422
timeout-minutes: 10
423423
needs: [check-should-run, get-changes, build-devextreme, determine-framework-tests-scope]
424-
if: needs.check-should-run.outputs.should-run == 'true' && needs.determine-framework-tests-scope.outputs.framework-tests-scope != 'none'
424+
if: |
425+
always() &&
426+
needs.check-should-run.outputs.should-run == 'true' &&
427+
needs.determine-framework-tests-scope.result == 'success' &&
428+
needs.determine-framework-tests-scope.outputs.framework-tests-scope == 'changed' &&
429+
needs.build-devextreme.result == 'success'
425430
426431
steps:
427432
- name: Get sources
428433
uses: actions/checkout@v4
429434

430-
- name: Download artifacts
431-
if: github.event_name == 'pull_request'
435+
- name: Download changed demos
432436
uses: actions/download-artifact@v4
433437
with:
434438
name: changed-demos
@@ -506,6 +510,82 @@ jobs:
506510
exit 1
507511
fi
508512
513+
check-generated-demos-all:
514+
name: Check generated demos (${{ matrix.CONSTEL }})
515+
runs-on: devextreme-shr2
516+
timeout-minutes: 15
517+
needs: [check-should-run, build-devextreme, determine-framework-tests-scope]
518+
if: |
519+
always() &&
520+
needs.check-should-run.outputs.should-run == 'true' &&
521+
needs.determine-framework-tests-scope.result == 'success' &&
522+
needs.determine-framework-tests-scope.outputs.framework-tests-scope == 'all' &&
523+
needs.build-devextreme.result == 'success'
524+
strategy:
525+
fail-fast: false
526+
matrix:
527+
CONSTEL: ['1/5', '2/5', '3/5', '4/5', '5/5']
528+
529+
steps:
530+
- name: Get sources
531+
uses: actions/checkout@v4
532+
533+
- uses: pnpm/action-setup@v4
534+
with:
535+
run_install: false
536+
537+
- name: Use Node.js
538+
uses: actions/setup-node@v4
539+
with:
540+
node-version: '20'
541+
542+
- name: Download devextreme sources
543+
uses: actions/download-artifact@v4
544+
with:
545+
name: devextreme-sources
546+
547+
- name: Get pnpm store directory
548+
shell: bash
549+
run: |
550+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
551+
552+
- uses: actions/cache/restore@v4
553+
name: Restore pnpm cache
554+
with:
555+
path: ${{ env.STORE_PATH }}
556+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
557+
restore-keys: |
558+
${{ runner.os }}-pnpm-store
559+
560+
- name: Install dependencies
561+
run: pnpm install --frozen-lockfile
562+
563+
- name: Install tgz
564+
working-directory: apps/demos
565+
run: pnpm add ../../devextreme-installer.tgz ../../devextreme-dist-installer.tgz ../../devextreme-react-installer.tgz ../../devextreme-vue-installer.tgz ../../devextreme-angular-installer.tgz
566+
567+
- name: Prepare JS
568+
working-directory: apps/demos
569+
run: pnpm run prepare-js
570+
571+
- name: Check generated JS demos
572+
working-directory: apps/demos
573+
env:
574+
CONSTEL: ${{ matrix.CONSTEL }}
575+
run: |
576+
echo "Running convert-to-js for split $CONSTEL"
577+
pnpm run convert-to-js
578+
579+
git add ./Demos -N
580+
581+
if git diff --exit-code . ':!package.json' ; then
582+
echo "Generated JS demos are up-to-date for split $CONSTEL"
583+
else
584+
echo "Generated JS demos are outdated for split $CONSTEL. Execute 'pnpm run convert-to-js split' and commit changes."
585+
echo "If you see another diff, ensure that extra listed files have LF endings."
586+
exit 1
587+
fi
588+
509589
testcafe-jquery:
510590
needs: [check-should-run, build-devextreme]
511591
if: |

apps/demos/Demos/Charts/AreaSparklines/React/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const years = ['2010', '2011', '2012'];
55

66
function App() {
77
return (
8-
<React.Fragment>
8+
<>
99
<div className="long-title"><h3>Monthly Prices of Copper, Nickel and Palladium</h3></div>
1010
<div id="chart-demo">
1111
<table className="demo-table" style={{ border: 1 }}>
@@ -22,7 +22,7 @@ function App() {
2222
</tbody>
2323
</table>
2424
</div>
25-
</React.Fragment>
25+
</>
2626
);
2727
}
2828

apps/demos/Demos/Charts/AreaSparklines/ReactJs/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import RowTemplate from './RowTemplate.js';
44
const years = ['2010', '2011', '2012'];
55
function App() {
66
return (
7-
<React.Fragment>
7+
<>
88
<div className="long-title">
99
<h3>Monthly Prices of Copper, Nickel and Palladium</h3>
1010
</div>
@@ -29,7 +29,7 @@ function App() {
2929
</tbody>
3030
</table>
3131
</div>
32-
</React.Fragment>
32+
</>
3333
);
3434
}
3535
export default App;

apps/demos/Demos/Charts/BarSparklines/React/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function App() {
2525
}, []);
2626

2727
return (
28-
<React.Fragment>
28+
<>
2929
<div className="long-title"><h3>Monthly Prices of Aluminium, Nickel and Copper</h3></div>
3030
<div id="chart-demo">
3131
<table
@@ -58,7 +58,7 @@ function App() {
5858
/>
5959
</div>
6060
</div>
61-
</React.Fragment>
61+
</>
6262
);
6363
}
6464

apps/demos/Demos/Charts/BarSparklines/ReactJs/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function App() {
2525
dataSource.load();
2626
}, []);
2727
return (
28-
<React.Fragment>
28+
<>
2929
<div className="long-title">
3030
<h3>Monthly Prices of Aluminium, Nickel and Copper</h3>
3131
</div>
@@ -61,7 +61,7 @@ function App() {
6161
/>
6262
</div>
6363
</div>
64-
</React.Fragment>
64+
</>
6565
);
6666
}
6767
export default App;

apps/demos/Demos/Charts/Colorization/React/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function App() {
2020
}, [setTypeOptions]);
2121

2222
return (
23-
<React.Fragment>
23+
<>
2424
<TreeMap
2525
id="treemap"
2626
dataSource={salesAmount}
@@ -49,7 +49,7 @@ function App() {
4949
/>
5050
</div>
5151
</div>
52-
</React.Fragment>
52+
</>
5353
);
5454
}
5555

apps/demos/Demos/Charts/Colorization/ReactJs/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function App() {
2020
[setTypeOptions],
2121
);
2222
return (
23-
<React.Fragment>
23+
<>
2424
<TreeMap
2525
id="treemap"
2626
dataSource={salesAmount}
@@ -49,7 +49,7 @@ function App() {
4949
/>
5050
</div>
5151
</div>
52-
</React.Fragment>
52+
</>
5353
);
5454
}
5555
export default App;

apps/demos/Demos/Charts/DiscreteAxisZoomingAndScrolling/React/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function App() {
4343
}, [setVisualRange]);
4444

4545
return (
46-
<React.Fragment>
46+
<>
4747
<Chart
4848
id="zoomedChart"
4949
palette="Soft"
@@ -79,7 +79,7 @@ function App() {
7979
<CommonSeriesSettingsOptions type="bar" ignoreEmptyPoints ={true} />
8080
</ChartOptions>
8181
</RangeSelector>
82-
</React.Fragment>
82+
</>
8383
);
8484
}
8585

apps/demos/Demos/Charts/DiscreteAxisZoomingAndScrolling/ReactJs/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function App() {
4848
[setVisualRange],
4949
);
5050
return (
51-
<React.Fragment>
51+
<>
5252
<Chart
5353
id="zoomedChart"
5454
palette="Soft"
@@ -95,7 +95,7 @@ function App() {
9595
/>
9696
</ChartOptions>
9797
</RangeSelector>
98-
</React.Fragment>
98+
</>
9999
);
100100
}
101101
export default App;

apps/demos/Demos/Charts/DiscreteData/React/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function App() {
1616
}, [setCurrentType]);
1717

1818
return (
19-
<React.Fragment>
19+
<>
2020
<div className="long-title">
2121
<h3>Average temperature in London</h3>
2222
</div>
@@ -53,7 +53,7 @@ function App() {
5353
/>
5454
</div>
5555
</div>
56-
</React.Fragment>
56+
</>
5757
);
5858
}
5959

0 commit comments

Comments
 (0)