From f36e34b1f386e6d34091abcd651c8a65f9e7fb59 Mon Sep 17 00:00:00 2001 From: Boryana Todorova Date: Mon, 8 Jan 2024 15:31:30 +0200 Subject: [PATCH 1/5] chore: add sample apps to ci --- .github/workflows/ci.yml | 120 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1d4cd6de --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,120 @@ +# Builds and tests example applications +name: CI + +on: + push: + branches-ignore: + - master + +env: + NODE_OPTIONS: --max_old_space_size=6144 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Use NodeJS v18 + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Fetch all branches + + - name: Build Coffee warehouse nextjs app + working-directory: ./examples/coffee-warehouse-nextjs + run: | + npm ci + npm run build + + - name: Build A Sales Dashboard app + working-directory: ./examples/kendo-react-build-a-sales-dashboard + run: | + npm ci + npm run build + + - name: Build File Manager app + working-directory: ./examples/kendo-react-file-manager + run: | + npm ci + npm run build + + - name: Build Finance Portfolio app + working-directory: ./examples/kendo-react-finance-portfolio + run: | + npm ci + npm run build + + - name: Build Homepage demo app + working-directory: ./examples/kendo-react-homepage-demo + run: | + npm ci + npm run build + + # - name: Build Marklogic app + # working-directory: ./examples/kendo-react-marklogic-example + # run: | + # cd setup + # npm i + # cd ../server + # npm i + # cd ../ui + # npm i + # npm run build + + - name: Build React Nextjs app + working-directory: ./examples/kendo-react-nextjs + run: | + npm ci + npm run build + + - name: Build React Nodejs Express app + working-directory: ./examples/kendo-react-nodejs-express + run: | + cd server + npm i + cd ../client + npm i + npm run build + + - name: Build React Sales Dashboard app + working-directory: ./examples/kendo-react-sales-dashboard + run: | + npm ci + CI= npm run build + + - name: Build React SSR app + working-directory: ./examples/kendo-react-ssr + run: | + npm ci + npm run build + + - name: Build React Stackblitz app + working-directory: ./examples/kendo-react-stackblitz-app + run: | + npm ci + npm run build + + - name: Build React Admin Dashboard app + working-directory: ./examples/react-admin-dashboard + run: | + npm ci + npm run build + + - name: Build React Coffee Warehouse app + working-directory: ./examples/react-coffee-warehouse + run: | + npm ci + npm run build + + - name: Build React Grid Live Data app + working-directory: ./examples/react-grid-live-data + run: | + npm ci + npm run build + + - name: Cleanup + run: git clean -xdf \ No newline at end of file From 0b21ca0a5cfc03fb4b81ca8b93c49f0edcdd69a2 Mon Sep 17 00:00:00 2001 From: Boryana Todorova Date: Thu, 11 Jan 2024 12:54:37 +0200 Subject: [PATCH 2/5] chore: add sample apps to cd --- .github/workflows/cd.yml | 43 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- bin/build-gh-pages | 21 ++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cd.yml create mode 100644 bin/build-gh-pages diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..9a80d12b --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,43 @@ +# Builds and publishes examples to GH pages +name: CD + +on: + push: + branches: + - master + +defaults: + run: + working-directory: ./examples + +env: + NODE_OPTIONS: --max_old_space_size=6144 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Use NodeJS v18 + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Check out repository + uses: actions/checkout@v4 + + - name: Build + run: ../bin/build-gh-pages + env: + KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }} + + - name: Deploy to GH Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ github.token }} + publish_dir: ./examples/dist + user_name: 'kendo-bot' + user_email: 'kendouiteam@progress.com' + + - name: Cleanup + run: git clean -xdf \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d4cd6de..70f48d3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# Builds and tests example applications +# Builds and tests sample applications name: CI on: diff --git a/bin/build-gh-pages b/bin/build-gh-pages new file mode 100644 index 00000000..9a7326e1 --- /dev/null +++ b/bin/build-gh-pages @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Builds example projects and deploys them to GH Pages +STANDALONE_PROJECTS=(kendo-react-finance-portfolio react-coffee-warehouse react-admin-dashboard kendo-react-homepage-demo kendo-react-file-manager react-grid-live-data) + +set -e + +# Standalone Projects +for PROJECT in "${STANDALONE_PROJECTS[@]}" +do + pushd ./examples/${PROJECT} > /dev/null + + echo Building ${PROJECT} + npm ci + rm -rf dist + npm run build + mkdir -p ../../dist/${PROJECT} + mv -v dist/* ../../dist/${PROJECT} + + popd > /dev/null +done \ No newline at end of file From cea6d166702bd02ebd7dea30621133883844e85c Mon Sep 17 00:00:00 2001 From: Boryana Todorova Date: Thu, 11 Jan 2024 17:01:29 +0200 Subject: [PATCH 3/5] chore: address comments --- .github/workflows/cd.yml | 5 +---- .github/workflows/ci.yml | 11 +++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9a80d12b..1e3c7c98 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -37,7 +37,4 @@ jobs: github_token: ${{ github.token }} publish_dir: ./examples/dist user_name: 'kendo-bot' - user_email: 'kendouiteam@progress.com' - - - name: Cleanup - run: git clean -xdf \ No newline at end of file + user_email: 'kendouiteam@progress.com' \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70f48d3d..20f01d1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,6 @@ jobs: - name: Check out repository uses: actions/checkout@v4 - with: - fetch-depth: 0 # Fetch all branches - name: Build Coffee warehouse nextjs app working-directory: ./examples/coffee-warehouse-nextjs @@ -75,9 +73,9 @@ jobs: working-directory: ./examples/kendo-react-nodejs-express run: | cd server - npm i + npm ci cd ../client - npm i + npm ci npm run build - name: Build React Sales Dashboard app @@ -114,7 +112,4 @@ jobs: working-directory: ./examples/react-grid-live-data run: | npm ci - npm run build - - - name: Cleanup - run: git clean -xdf \ No newline at end of file + npm run build \ No newline at end of file From b75677b99a55f3e4a7ecd02fa743c0efbcdebab6 Mon Sep 17 00:00:00 2001 From: Boryana Todorova Date: Fri, 12 Jan 2024 10:47:05 +0200 Subject: [PATCH 4/5] chore: add index.html page --- .github/workflows/cd.yml | 6 +++--- {bin => live/bin}/build-gh-pages | 11 +++++++---- live/static/404.html | 15 +++++++++++++++ live/static/index.html | 27 +++++++++++++++++++++++++++ live/static/style.css | 4 ++++ 5 files changed, 56 insertions(+), 7 deletions(-) rename {bin => live/bin}/build-gh-pages (71%) create mode 100644 live/static/404.html create mode 100644 live/static/index.html create mode 100644 live/static/style.css diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1e3c7c98..96e60766 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,7 +8,7 @@ on: defaults: run: - working-directory: ./examples + working-directory: ./live env: NODE_OPTIONS: --max_old_space_size=6144 @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v4 - name: Build - run: ../bin/build-gh-pages + run: ./bin/build-gh-pages env: KENDO_UI_LICENSE: ${{ secrets.KENDO_UI_LICENSE }} @@ -35,6 +35,6 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ github.token }} - publish_dir: ./examples/dist + publish_dir: ./live/dist user_name: 'kendo-bot' user_email: 'kendouiteam@progress.com' \ No newline at end of file diff --git a/bin/build-gh-pages b/live/bin/build-gh-pages similarity index 71% rename from bin/build-gh-pages rename to live/bin/build-gh-pages index 9a7326e1..4f8ad7bf 100644 --- a/bin/build-gh-pages +++ b/live/bin/build-gh-pages @@ -8,14 +8,17 @@ set -e # Standalone Projects for PROJECT in "${STANDALONE_PROJECTS[@]}" do - pushd ./examples/${PROJECT} > /dev/null + pushd ../examples/${PROJECT} > /dev/null echo Building ${PROJECT} npm ci rm -rf dist npm run build - mkdir -p ../../dist/${PROJECT} - mv -v dist/* ../../dist/${PROJECT} + mkdir -p ../../live/dist/${PROJECT} + mv -v dist/* ../../live/dist/${PROJECT} popd > /dev/null -done \ No newline at end of file +done + +# Copy static assets +cp static/* dist \ No newline at end of file diff --git a/live/static/404.html b/live/static/404.html new file mode 100644 index 00000000..4fd6a4fd --- /dev/null +++ b/live/static/404.html @@ -0,0 +1,15 @@ + + + + + KendoReact - Sample Applications + + + +

Error

+ +

+ Resource not found. +

+ + \ No newline at end of file diff --git a/live/static/index.html b/live/static/index.html new file mode 100644 index 00000000..9d772cc1 --- /dev/null +++ b/live/static/index.html @@ -0,0 +1,27 @@ + + + + + KendoReact - Sample Applications + + + +

KendoReact - Sample Applications

+

+ This GitHub pages site hosts runnable versions of the following sample applications: +

+

+

+ To access the source code of all sample applications, go to the + telerik/kendo-react GitHub + repository. +

+ + \ No newline at end of file diff --git a/live/static/style.css b/live/static/style.css new file mode 100644 index 00000000..3bb09f33 --- /dev/null +++ b/live/static/style.css @@ -0,0 +1,4 @@ +html { + font-family: sans-serif; + line-height: 1.15; + } \ No newline at end of file From 42cea98d85a6222debf5e9ebdee7d06a21bed6db Mon Sep 17 00:00:00 2001 From: Boryana Todorova Date: Tue, 23 Jan 2024 11:46:30 +0200 Subject: [PATCH 5/5] chore: remove marklogic app from ci file --- .github/workflows/ci.yml | 13 +--- .../package-lock.json | 74 ++++++------------- .../kendo-react-sales-dashboard/package.json | 4 +- 3 files changed, 24 insertions(+), 67 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20f01d1e..07e3f0f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,17 +52,6 @@ jobs: npm ci npm run build - # - name: Build Marklogic app - # working-directory: ./examples/kendo-react-marklogic-example - # run: | - # cd setup - # npm i - # cd ../server - # npm i - # cd ../ui - # npm i - # npm run build - - name: Build React Nextjs app working-directory: ./examples/kendo-react-nextjs run: | @@ -82,7 +71,7 @@ jobs: working-directory: ./examples/kendo-react-sales-dashboard run: | npm ci - CI= npm run build + npm run build - name: Build React SSR app working-directory: ./examples/kendo-react-ssr diff --git a/examples/kendo-react-sales-dashboard/package-lock.json b/examples/kendo-react-sales-dashboard/package-lock.json index 4ece144a..84109ebf 100644 --- a/examples/kendo-react-sales-dashboard/package-lock.json +++ b/examples/kendo-react-sales-dashboard/package-lock.json @@ -26,8 +26,8 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@progress/kendo-theme-default": "^7.0.2", - "@progress/kendo-theme-material": "dev", + "@progress/kendo-theme-default": "^7.2.0", + "@progress/kendo-theme-material": "^7.2.0", "react-scripts": "5.0.1" } }, @@ -4041,73 +4041,41 @@ "integrity": "sha512-zAwxw8lt5xlIBMoE3uwUX2Z2RI5njWViYxdFoinvr5d8WJ6kU3sghNONsRelM9GiDd2vbSg0IkEN8dOrBvFjPg==" }, "node_modules/@progress/kendo-theme-core": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@progress/kendo-theme-core/-/kendo-theme-core-7.0.2.tgz", - "integrity": "sha512-poq6dZ/SkKSpfR0agzuWWlX/JXMK9LhBUx0dNWA7NzkEnfvjkmX7rDgPPmy6ZfLFTuMjf1ehKhykxLlATu7c1g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@progress/kendo-theme-core/-/kendo-theme-core-7.2.0.tgz", + "integrity": "sha512-jzXzL0TY+6GpqVtQF9EIdy5EW81S9EEFAFEd2B7Zi1eN9WjGn7agDaAi6+hKNsCMBIv81Vmxahvs6C16ccU3UA==", "dev": true }, "node_modules/@progress/kendo-theme-default": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@progress/kendo-theme-default/-/kendo-theme-default-7.0.2.tgz", - "integrity": "sha512-t6c9nkEPh0Nafq3XnsxKN4zWv1xSOTfVGoatwKcnSOyWY3iqoLZdiRHITnkzzC/2QLm2ZD4hftEPrq9vfrbV0Q==", - "dev": true, - "dependencies": { - "@progress/kendo-svg-icons": "2.0.0", - "@progress/kendo-theme-core": "7.0.2", - "@progress/kendo-theme-utils": "7.0.2" - } - }, - "node_modules/@progress/kendo-theme-default/node_modules/@progress/kendo-svg-icons": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@progress/kendo-svg-icons/-/kendo-svg-icons-2.0.0.tgz", - "integrity": "sha512-0eXDk+lgjg6r2TIUBp383sqKQbQZido0S/KnrF3ZEqxJ+rO10K6WSphFINmk0BKqneAaA94RVwPsMb5yOY/PbA==", - "dev": true - }, - "node_modules/@progress/kendo-theme-material": { - "version": "7.1.0-dev.4", - "resolved": "https://registry.npmjs.org/@progress/kendo-theme-material/-/kendo-theme-material-7.1.0-dev.4.tgz", - "integrity": "sha512-WBlDrs5eGVfru+cFvotKKjR0URDo83FmMPPvcp3MaWwn1ygd6Kxw3E441LizN+7MMJ621TIAKgOWcNy8MHSFqQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@progress/kendo-theme-default/-/kendo-theme-default-7.2.0.tgz", + "integrity": "sha512-57cf6Cwl94S87dNhOQwajEbAaPcLnq0jL9jxxMEG/cY18y3ErGrTy1jaUvsSfIHEEMgKVUqkTdb4+Od6dKrSaA==", "dev": true, "dependencies": { "@progress/kendo-svg-icons": "2.1.0", - "@progress/kendo-theme-core": "7.1.0-dev.4", - "@progress/kendo-theme-default": "7.1.0-dev.4", - "@progress/kendo-theme-utils": "7.1.0-dev.4" + "@progress/kendo-theme-core": "7.2.0", + "@progress/kendo-theme-utils": "7.2.0" } }, - "node_modules/@progress/kendo-theme-material/node_modules/@progress/kendo-theme-core": { - "version": "7.1.0-dev.4", - "resolved": "https://registry.npmjs.org/@progress/kendo-theme-core/-/kendo-theme-core-7.1.0-dev.4.tgz", - "integrity": "sha512-ILUn6SgEho5eoY1Bh5DIuXATx7ewUHPn/y+dpJXAuQagjY021YW4xbWk30IcLnjM6WHphsCttUv17NagDnqaoQ==", - "dev": true - }, - "node_modules/@progress/kendo-theme-material/node_modules/@progress/kendo-theme-default": { - "version": "7.1.0-dev.4", - "resolved": "https://registry.npmjs.org/@progress/kendo-theme-default/-/kendo-theme-default-7.1.0-dev.4.tgz", - "integrity": "sha512-I9WanY6CBDpWBizHdhN6ulMu1kKQNFIqKNWoN49NQ7DTHZ1TvSFnhEYyQ9NGjNOZTtnQhr8wTiEDrqkXYU0+Bw==", + "node_modules/@progress/kendo-theme-material": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@progress/kendo-theme-material/-/kendo-theme-material-7.2.0.tgz", + "integrity": "sha512-Jak/VQ0HV7E5+5rEz0CyeetIqVc7Eb5E5MAsHAzQVfZQ7zoYZ2FlCKFdKfcQfAwDumJmw36AFsKkWGFXd3NuBw==", "dev": true, "dependencies": { "@progress/kendo-svg-icons": "2.1.0", - "@progress/kendo-theme-core": "7.1.0-dev.4", - "@progress/kendo-theme-utils": "7.1.0-dev.4" - } - }, - "node_modules/@progress/kendo-theme-material/node_modules/@progress/kendo-theme-utils": { - "version": "7.1.0-dev.4", - "resolved": "https://registry.npmjs.org/@progress/kendo-theme-utils/-/kendo-theme-utils-7.1.0-dev.4.tgz", - "integrity": "sha512-Ft3AqVDxA8SXcScrFy44nEwNfWavgTcb0g+K8XXBmhgo595f+BxGwoI7vQQ/NceH9JHy51Le1WkDyRngL+NdfQ==", - "dev": true, - "dependencies": { - "@progress/kendo-theme-core": "7.1.0-dev.4" + "@progress/kendo-theme-core": "7.2.0", + "@progress/kendo-theme-default": "7.2.0", + "@progress/kendo-theme-utils": "7.2.0" } }, "node_modules/@progress/kendo-theme-utils": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@progress/kendo-theme-utils/-/kendo-theme-utils-7.0.2.tgz", - "integrity": "sha512-jSO8jRMsa5orlDUypB8V0cXn+5i1kVUTKwVCIO53hYkkgsmELnJlJcKo+ToVpKSUH5IX+c5j0XfkTtoJiCAA7w==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@progress/kendo-theme-utils/-/kendo-theme-utils-7.2.0.tgz", + "integrity": "sha512-13iVDNFr8JBI92PGaKG4KuCi5fgD6q+mrFztLLJ9CNhlHzSiPSXESMn3o2YkMYzKJbYObYNn9FubWqcS9Uzp6w==", "dev": true, "dependencies": { - "@progress/kendo-theme-core": "7.0.2" + "@progress/kendo-theme-core": "7.2.0" } }, "node_modules/@progress/pako-esm": { diff --git a/examples/kendo-react-sales-dashboard/package.json b/examples/kendo-react-sales-dashboard/package.json index 7183e38e..0f8b3573 100644 --- a/examples/kendo-react-sales-dashboard/package.json +++ b/examples/kendo-react-sales-dashboard/package.json @@ -22,8 +22,8 @@ }, "devDependencies": { "react-scripts": "5.0.1", - "@progress/kendo-theme-default": "^7.0.2", - "@progress/kendo-theme-material": "dev" + "@progress/kendo-theme-default": "^7.2.0", + "@progress/kendo-theme-material": "^7.2.0" }, "scripts": { "start": "react-scripts start",