Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 85 additions & 5 deletions .github/workflows/demos_visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -416,19 +416,23 @@ jobs:
pnpm run lint-demos
fi

check-generated-demos:
name: Check generated demos
check-generated-demos-changed:
name: Check generated demos (changed only)
runs-on: devextreme-shr2
timeout-minutes: 10
needs: [check-should-run, get-changes, build-devextreme, determine-framework-tests-scope]
if: needs.check-should-run.outputs.should-run == 'true' && needs.determine-framework-tests-scope.outputs.framework-tests-scope != 'none'
if: |
always() &&
needs.check-should-run.outputs.should-run == 'true' &&
needs.determine-framework-tests-scope.result == 'success' &&
needs.determine-framework-tests-scope.outputs.framework-tests-scope == 'changed' &&
needs.build-devextreme.result == 'success'

steps:
- name: Get sources
uses: actions/checkout@v4

- name: Download artifacts
if: github.event_name == 'pull_request'
- name: Download changed demos
uses: actions/download-artifact@v4
with:
name: changed-demos
Expand Down Expand Up @@ -506,6 +510,82 @@ jobs:
exit 1
fi

check-generated-demos-all:
name: Check generated demos (${{ matrix.CONSTEL }})
runs-on: devextreme-shr2
timeout-minutes: 15
needs: [check-should-run, build-devextreme, determine-framework-tests-scope]
if: |
always() &&
needs.check-should-run.outputs.should-run == 'true' &&
needs.determine-framework-tests-scope.result == 'success' &&
needs.determine-framework-tests-scope.outputs.framework-tests-scope == 'all' &&
needs.build-devextreme.result == 'success'
strategy:
fail-fast: false
matrix:
CONSTEL: ['1/5', '2/5', '3/5', '4/5', '5/5']

steps:
- name: Get sources
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
run_install: false

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Download devextreme sources
uses: actions/download-artifact@v4
with:
name: devextreme-sources

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache/restore@v4
name: Restore pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install tgz
working-directory: apps/demos
run: pnpm add ../../devextreme-installer.tgz ../../devextreme-dist-installer.tgz ../../devextreme-react-installer.tgz ../../devextreme-vue-installer.tgz ../../devextreme-angular-installer.tgz

- name: Prepare JS
working-directory: apps/demos
run: pnpm run prepare-js

- name: Check generated JS demos
working-directory: apps/demos
env:
CONSTEL: ${{ matrix.CONSTEL }}
run: |
echo "Running convert-to-js for split $CONSTEL"
pnpm run convert-to-js

git add ./Demos -N

if git diff --exit-code . ':!package.json' ; then
echo "Generated JS demos are up-to-date for split $CONSTEL"
else
echo "Generated JS demos are outdated for split $CONSTEL. Execute 'pnpm run convert-to-js split' and commit changes."
echo "If you see another diff, ensure that extra listed files have LF endings."
exit 1
fi

testcafe-jquery:
needs: [check-should-run, build-devextreme]
if: |
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/AreaSparklines/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const years = ['2010', '2011', '2012'];

function App() {
return (
<React.Fragment>
<>
<div className="long-title"><h3>Monthly Prices of Copper, Nickel and Palladium</h3></div>
<div id="chart-demo">
<table className="demo-table" style={{ border: 1 }}>
Expand All @@ -22,7 +22,7 @@ function App() {
</tbody>
</table>
</div>
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/AreaSparklines/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import RowTemplate from './RowTemplate.js';
const years = ['2010', '2011', '2012'];
function App() {
return (
<React.Fragment>
<>
<div className="long-title">
<h3>Monthly Prices of Copper, Nickel and Palladium</h3>
</div>
Expand All @@ -29,7 +29,7 @@ function App() {
</tbody>
</table>
</div>
</React.Fragment>
</>
);
}
export default App;
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/BarSparklines/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function App() {
}, []);

return (
<React.Fragment>
<>
<div className="long-title"><h3>Monthly Prices of Aluminium, Nickel and Copper</h3></div>
<div id="chart-demo">
<table
Expand Down Expand Up @@ -58,7 +58,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/BarSparklines/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function App() {
dataSource.load();
}, []);
return (
<React.Fragment>
<>
<div className="long-title">
<h3>Monthly Prices of Aluminium, Nickel and Copper</h3>
</div>
Expand Down Expand Up @@ -61,7 +61,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}
export default App;
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/Colorization/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function App() {
}, [setTypeOptions]);

return (
<React.Fragment>
<>
<TreeMap
id="treemap"
dataSource={salesAmount}
Expand Down Expand Up @@ -49,7 +49,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/Colorization/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function App() {
[setTypeOptions],
);
return (
<React.Fragment>
<>
<TreeMap
id="treemap"
dataSource={salesAmount}
Expand Down Expand Up @@ -49,7 +49,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}
export default App;
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function App() {
}, [setVisualRange]);

return (
<React.Fragment>
<>
<Chart
id="zoomedChart"
palette="Soft"
Expand Down Expand Up @@ -79,7 +79,7 @@ function App() {
<CommonSeriesSettingsOptions type="bar" ignoreEmptyPoints ={true} />
</ChartOptions>
</RangeSelector>
</React.Fragment>
</>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function App() {
[setVisualRange],
);
return (
<React.Fragment>
<>
<Chart
id="zoomedChart"
palette="Soft"
Expand Down Expand Up @@ -95,7 +95,7 @@ function App() {
/>
</ChartOptions>
</RangeSelector>
</React.Fragment>
</>
);
}
export default App;
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/DiscreteData/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function App() {
}, [setCurrentType]);

return (
<React.Fragment>
<>
<div className="long-title">
<h3>Average temperature in London</h3>
</div>
Expand Down Expand Up @@ -53,7 +53,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/DiscreteData/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function App() {
[setCurrentType],
);
return (
<React.Fragment>
<>
<div className="long-title">
<h3>Average temperature in London</h3>
</div>
Expand Down Expand Up @@ -51,7 +51,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}
export default App;
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/DrillDown/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function App() {
}, [setDrillInfo]);

return (
<React.Fragment>
<>
<TreeMap
dataSource={citiesPopulation}
interactWithGroup={true}
Expand All @@ -59,7 +59,7 @@ function App() {
onItemClick={drillInfoClick}
treeInfo={drillInfo}
/>
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/DrillDown/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function App() {
[setDrillInfo],
);
return (
<React.Fragment>
<>
<TreeMap
dataSource={citiesPopulation}
interactWithGroup={true}
Expand All @@ -52,7 +52,7 @@ function App() {
onItemClick={drillInfoClick}
treeInfo={drillInfo}
/>
</React.Fragment>
</>
);
}
export default App;
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/ExportAndPrintingAPI/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function App() {
}, []);

return (
<React.Fragment>
<>
<Chart
id="chart"
ref={chartRef}
Expand All @@ -54,7 +54,7 @@ function App() {
&nbsp;
<Button icon="export" text="Export" onClick={exportChart} />
</div>
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/ExportAndPrintingAPI/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function App() {
chartRef.current.instance().exportTo('Example', 'png');
}, []);
return (
<React.Fragment>
<>
<Chart
id="chart"
ref={chartRef}
Expand Down Expand Up @@ -65,7 +65,7 @@ function App() {
onClick={exportChart}
/>
</div>
</React.Fragment>
</>
);
}
export default App;
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/Line/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function App() {
}, []);

return (
<React.Fragment>
<>
<Chart palette="Violet" dataSource={countriesInfo}>
<CommonSeriesSettings argumentField="country" type={type} />
{energySources.map((item) => (
Expand Down Expand Up @@ -64,7 +64,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Charts/Line/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function App() {
setType(e.value);
}, []);
return (
<React.Fragment>
<>
<Chart
palette="Violet"
dataSource={countriesInfo}
Expand Down Expand Up @@ -71,7 +71,7 @@ function App() {
/>
</div>
</div>
</React.Fragment>
</>
);
}
export default App;
Loading
Loading