-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish demo to github pages #27648
Merged
ivanblinov2k17
merged 67 commits into
DevExpress:24_1
from
ivanblinov2k17:publishing-to-gh-pages
Jul 25, 2024
Merged
Publish demo to github pages #27648
Changes from 60 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
2d7546e
Move building demos for publishing to gh pages from 23_2, Angular fixed
ivanblinov2k17 193f1cc
Add CI pipeline
ivanblinov2k17 4a92950
Fix css path
ivanblinov2k17 d7cbbbc
Copying themes from node_modules and using them
ivanblinov2k17 84c2ec0
Add testing workflow
ivanblinov2k17 be643c0
move installing chrome in action
ivanblinov2k17 37aed8a
Log list of files in gh action
ivanblinov2k17 67cdff4
Checkout devextreme into a separate folder
ivanblinov2k17 fe8f211
Fix path to chrome
ivanblinov2k17 6ac2b7b
Create a separate runner for github tests + add css to path
ivanblinov2k17 8b1699b
WA for no __dirname in mjs files
ivanblinov2k17 45e2b8d
Fix wrong import of path.dirname
ivanblinov2k17 d656628
Fix gh demo server path
ivanblinov2k17 89c3b81
Reduce number of test to react material for debug purpose
ivanblinov2k17 82dd7bf
Copy images folder + add metadata for specific cdn
ivanblinov2k17 34007bb
Add test workflow to deploy on gh-pages by hand
ivanblinov2k17 b228fef
Modify test Deploy workflow
ivanblinov2k17 898b685
Enable tests for grid only + add some titles to resources
ivanblinov2k17 ce70e3f
Run screenshot test only for grid
ivanblinov2k17 b4a42d9
fix generic theme name in tests
ivanblinov2k17 155c515
Move title from index.html inside of component and remove title from …
ivanblinov2k17 0bbcbdf
Add post modify for angular to wait for theme loading
ivanblinov2k17 fd473d0
Change class long-title to increase css specifity
ivanblinov2k17 872adf2
Ignore max callstack for React and Vue, try to fix manual test
ivanblinov2k17 993b6cd
Exclude max callstack from manual tests + fix test url
ivanblinov2k17 166b848
Fix MultiRowHeadersBands title
ivanblinov2k17 f96b3a8
Fix angular ts errors for grid + ignore one more demo for vue only
ivanblinov2k17 ee8c256
Fix options style defined for some reason in a separate css
ivanblinov2k17 ce60a9f
Fix ToolbarCustomization(probably need to change not here, but in rea…
ivanblinov2k17 1c9afbb
Remove matrix-test-helper-github to use env var, rm extra tiltle
ivanblinov2k17 0b634a8
Remove break from for cycle because it breaks not only 1 demo, but th…
ivanblinov2k17 98c759b
Fix ENV -> env
ivanblinov2k17 e5b9cbf
fix url
ivanblinov2k17 f9fe1f4
Skip failing vue tests due to templates + 2 miss style
ivanblinov2k17 9bb5556
Remove old WA for angular build
ivanblinov2k17 c2277df
rm selector changes for old WA
ivanblinov2k17 71044ca
Rm extra files that should be under gitignore
ivanblinov2k17 25c7f3b
Remove empty change on menuMeta
ivanblinov2k17 2c0bc24
Fix masterDetail to be the same as before WA changes
ivanblinov2k17 4476e9a
Remove duplicating testcafe runner file, add env variable
ivanblinov2k17 7159e07
Moved ignored list to a separate file, delete extra file, add 1 vue d…
ivanblinov2k17 61853cb
Merge remote-tracking branch 'origin/24_1' into publishing-to-gh-pages
ivanblinov2k17 423e950
Add missing import
ivanblinov2k17 a539181
Bring back src in .testcaferc because src in runner is redundant afte…
alexslavr b434e46
Fix lockfile
alexslavr 6f7e82c
Ignore html templates in lint-html. Fix lint-js error
alexslavr 342f1d2
Bring back webserver to 8080 port
ivanblinov2k17 dd8d4f0
Change order change theme and url + fix settings.json
ivanblinov2k17 36674f3
Move change theme in matrix-test-helper + delete redundant file
ivanblinov2k17 69f2649
Fix CI URL for regular tests
ivanblinov2k17 1aab49a
Small refactor
ivanblinov2k17 029e6ea
missing semicolon
ivanblinov2k17 aaf96a8
rm onpush action in pages deploy workflow
ivanblinov2k17 90f6380
Rm comment, add eols, rm onpush publishing, bring back manual tests o…
ivanblinov2k17 272b820
Update actions versions to v4 where it's possible
ivanblinov2k17 c5b2d58
Downdrage actions/upload-artifact from v4 to v3 becuse of bug
ivanblinov2k17 37e8625
Revert "Downdrage actions/upload-artifact from v4 to v3 becuse of bug"
ivanblinov2k17 55c19d6
Fix Mike's suggestions after review
ivanblinov2k17 0c172b0
Fix Vlad's review suggestions
ivanblinov2k17 fb4ff5d
Refactor getDemoPath
ivanblinov2k17 3da7247
Fix lint github-ignored-list
ivanblinov2k17 0928bfc
Fix Master-detail modules
ivanblinov2k17 4e1598d
Fix vue toolbar scoped css issue
ivanblinov2k17 1e6dd78
Fix path to data
ivanblinov2k17 f5612ea
Merge branch '24_1' into publishing-to-gh-pages
ivanblinov2k17 8de9aff
Merge branch '24_1' into publishing-to-gh-pages
ivanblinov2k17 beb8cc2
Update etalon for vectormap_tooltip test (bring back an old one)
ivanblinov2k17 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload entire repository | ||
path: '.' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
name: Publish Demos to GH Pages | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-devextreme: | ||
runs-on: ubuntu-latest | ||
name: Build DevExtreme | ||
timeout-minutes: 20 | ||
|
||
steps: | ||
- name: Get sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Restore npm cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-modules | ||
|
||
- name: DevExtreme - Install packages | ||
run: npm install --no-audit --no-fund | ||
|
||
- name: DevExtreme - Build-all | ||
env: | ||
BUILD_TEST_INTERNAL_PACKAGE: true | ||
run: npm run all:build | ||
|
||
- name: Move packages | ||
run: | | ||
mv ./packages/devextreme/artifacts/npm/devextreme/*.tgz ./devextreme-installer.tgz | ||
mv ./packages/devextreme/artifacts/npm/devextreme-dist/*.tgz ./devextreme-dist-installer.tgz | ||
mv ./packages/devextreme-angular/npm/dist/*.tgz ./devextreme-angular-installer.tgz | ||
mv ./packages/devextreme-react/npm/*.tgz ./devextreme-react-installer.tgz | ||
mv ./packages/devextreme-vue/npm/*.tgz ./devextreme-vue-installer.tgz | ||
|
||
- name: Copy build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: devextreme-sources | ||
path: | | ||
devextreme-installer.tgz | ||
devextreme-dist-installer.tgz | ||
devextreme-angular-installer.tgz | ||
devextreme-react-installer.tgz | ||
devextreme-vue-installer.tgz | ||
retention-days: 1 | ||
|
||
publish-ES: | ||
runs-on: ubuntu-latest | ||
needs: [build-devextreme] | ||
steps: | ||
- name: Get sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Download devextreme sources | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: devextreme-sources | ||
|
||
# NOTE: workaround due to wrappers are incorrect NPM packages now | ||
- name: Install wrappers packages | ||
run: | | ||
rm -rf node_modules/devextreme node_modules/devextreme-dist node_modules/devextreme-angular node_modules/devextreme-react node_modules/devextreme-vue | ||
mkdir node_modules/devextreme node_modules/devextreme-dist node_modules/devextreme-angular node_modules/devextreme-react node_modules/devextreme-vue | ||
tar -xzf devextreme-installer.tgz -C node_modules/devextreme | ||
mv node_modules/devextreme/package/* node_modules/devextreme | ||
tar -xzf devextreme-dist-installer.tgz -C node_modules/devextreme-dist | ||
mv node_modules/devextreme-dist/package/* node_modules/devextreme-dist | ||
tar -xzf devextreme-angular-installer.tgz -C node_modules/devextreme-angular | ||
mv node_modules/devextreme-angular/package/* node_modules/devextreme-angular | ||
tar -xzf devextreme-react-installer.tgz -C node_modules/devextreme-react | ||
mv node_modules/devextreme-react/package/* node_modules/devextreme-react | ||
tar -xzf devextreme-vue-installer.tgz -C node_modules/devextreme-vue | ||
mv node_modules/devextreme-vue/package/* node_modules/devextreme-vue | ||
|
||
- name: Prepare configs | ||
working-directory: apps/demos | ||
run: npm run prepare-js | ||
|
||
- name: Copy metadata | ||
working-directory: apps/demos | ||
run: npm run make-demos-bundle -- --copy-metadata | ||
|
||
- name: Prepare React demo bundles | ||
working-directory: apps/demos | ||
run: npm run make-demos-bundle -- --framework React | ||
|
||
- name: Prepare Vue demo bundles | ||
working-directory: apps/demos | ||
run: npm run make-demos-bundle -- --framework Vue | ||
|
||
- name: Save publish-demos directory for ES as an artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: publish-demos | ||
path: ./apps/demos/publish-demos | ||
|
||
publish-angular: | ||
runs-on: ubuntu-latest | ||
needs: [build-devextreme] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- name: Check generated demos (1/10) | ||
command: CONSTEL=1/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (2/10) | ||
command: CONSTEL=2/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (3/10) | ||
command: CONSTEL=3/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (4/10) | ||
command: CONSTEL=4/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (5/10) | ||
command: CONSTEL=5/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (6/10) | ||
command: CONSTEL=6/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (7/10) | ||
command: CONSTEL=7/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (8/10) | ||
command: CONSTEL=8/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (9/10) | ||
command: CONSTEL=9/10 npm run make-demos-bundle -- --framework Angular | ||
- name: Check generated demos (10/10) | ||
command: CONSTEL=10/10 npm run make-demos-bundle -- --framework Angular | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js v18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Download devextreme sources | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: devextreme-sources | ||
|
||
# NOTE: workaround due to wrappers are incorrect NPM packages now | ||
- name: Install wrappers packages | ||
run: | | ||
rm -rf node_modules/devextreme node_modules/devextreme-dist node_modules/devextreme-angular node_modules/devextreme-react node_modules/devextreme-vue | ||
mkdir node_modules/devextreme node_modules/devextreme-dist node_modules/devextreme-angular node_modules/devextreme-react node_modules/devextreme-vue | ||
tar -xzf devextreme-installer.tgz -C node_modules/devextreme | ||
mv node_modules/devextreme/package/* node_modules/devextreme | ||
tar -xzf devextreme-dist-installer.tgz -C node_modules/devextreme-dist | ||
mv node_modules/devextreme-dist/package/* node_modules/devextreme-dist | ||
tar -xzf devextreme-angular-installer.tgz -C node_modules/devextreme-angular | ||
mv node_modules/devextreme-angular/package/* node_modules/devextreme-angular | ||
tar -xzf devextreme-react-installer.tgz -C node_modules/devextreme-react | ||
mv node_modules/devextreme-react/package/* node_modules/devextreme-react | ||
tar -xzf devextreme-vue-installer.tgz -C node_modules/devextreme-vue | ||
mv node_modules/devextreme-vue/package/* node_modules/devextreme-vue | ||
|
||
- name: Prepare configs | ||
working-directory: apps/demos | ||
run: npm run prepare-js | ||
|
||
- name: Copy metadata | ||
working-directory: apps/demos | ||
run: npm run make-demos-bundle -- --copy-metadata | ||
|
||
- name: Update angular.json | ||
working-directory: apps/demos | ||
run: npm run update-angular-json | ||
|
||
- name: Create angular entryPoints to compile faster | ||
working-directory: apps/demos | ||
run: npm run launch-ngcc | ||
|
||
- name: Prepare Angular demo bundles | ||
working-directory: apps/demos | ||
run: | | ||
${{ matrix.command }} | ||
|
||
- name: Angular post process index.html | ||
working-directory: apps/demos | ||
run: npm run post-process-angular | ||
|
||
- name: Save publish-demos directory for Angular as an artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: publish-demos | ||
path: ./apps/demos/publish-demos | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [build-devextreme, publish-ES, publish-angular] | ||
steps: | ||
- name: Download publish-demos artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: publish-demos | ||
path: ./apps/demos/publish-demos | ||
- name: Deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./apps/demos/publish-demos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Test demos from gh-pages branch before publishing | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
testcafe: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
CONSTEL: [react(1/4), react(2/4), react(3/4), react(4/4), vue(1/4), vue(2/4), vue(3/4), vue(4/4), angular(1/4), angular(2/4), angular(3/4), angular(4/4)] | ||
THEME: ['generic.light', 'material.blue.light', 'fluent.blue.light'] | ||
|
||
|
||
runs-on: ubuntu-latest | ||
name: testcafe-${{ matrix.CONSTEL }}-${{ matrix.THEME }} | ||
timeout-minutes: 60 | ||
env: | ||
TARGET_BRANCH: ${{ github.ref_name }} | ||
|
||
steps: | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20' | ||
|
||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- name: Run Web Server | ||
working-directory: gh-pages | ||
run: | | ||
python -m http.server 8080 & | ||
python -m http.server 8081 & | ||
python -m http.server 8082 & | ||
python -m http.server 8083 & | ||
|
||
- name: Checkout main branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ env.TARGET_BRANCH }} | ||
path: devextreme | ||
|
||
- name: Console.log ls | ||
run: ls -al & cd gh-pages & ls -al | ||
|
||
- name: Setup Chrome | ||
uses: ./devextreme/.github/actions/setup-chrome | ||
with: | ||
chrome-version: '121.0.6167.160' | ||
|
||
- name: DevExtreme - Install packages | ||
working-directory: devextreme | ||
run: npm install --no-audit --no-fund | ||
|
||
- name: Run TestCafe tests | ||
working-directory: devextreme/apps/demos | ||
env: | ||
CHANGEDFILEINFOSPATH: changed-files.json | ||
BROWSERS: chrome:headless --disable-partial-raster --disable-skia-runtime-opts --run-all-compositor-stages-before-draw --disable-new-content-rendering-timeout --disable-threaded-animation --disable-threaded-scrolling --disable-checker-imaging --disable-image-animation-resync --use-gl="swiftshader" --disable-features=PaintHolding --js-flags=--random-seed=2147483647 --font-render-hinting=none --disable-font-subpixel-positioning | ||
#DEBUG: hammerhead:*,testcafe:* | ||
CONCURRENCY: 4 | ||
TCQUARANTINE: true | ||
CONSTEL: ${{ matrix.CONSTEL }} | ||
THEME: ${{ matrix.THEME }} | ||
ISGITHUBDEMOS: true | ||
# DISABLE_DEMO_TEST_SETTINGS: all # Uncomment to ignore all the visualtestrc.json settings | ||
# DISABLE_DEMO_TEST_SETTINGS: ignore # Uncomment to ignore the `ignore` field | ||
# DISABLE_DEMO_TEST_SETTINGS: comparison-options # Uncomment to ignore the `comparison-options` field | ||
CI_ENV: true # The `ignore` field in the visualtestrc.json should be disabled when running test locally | ||
run: npx nx test-testcafe | ||
|
||
- name: Copy screenshots artifacts | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: screenshots | ||
path: ${{ github.workspace }}/devextreme/apps/demos/testing/artifacts/compared-screenshots/**/* | ||
if-no-files-found: ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,6 @@ Demos/**/tsconfig.json | |
|
||
.DS_Store | ||
publish-demos | ||
|
||
.angular | ||
angular.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
.github | ||
publish-demos | ||
coverage | ||
utils/**/template.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/demos/Demos/DataGrid/ExcelJSHeaderAndFooter/Angular/app/app.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not v4? We will get warnings because v3 use node16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just copy pasted it from prev version, where 18 node was needed, seems like nothing stops us now from updating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, there is a bug related to upload-artifact@v4
actions/upload-artifact#478
Lead to failing CI
https://github.com/ivanblinov2k17/DevExtreme/actions/runs/9792470726/job/27038840580
Downgraded it from v4 to v3