Skip to content

Commit

Permalink
Merge branch '23_2' into ts-navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanblinov2k17 committed Nov 8, 2023
2 parents 8fd51fa + d869b46 commit 63addb4
Show file tree
Hide file tree
Showing 2,311 changed files with 188,916 additions and 28,880 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ node_modules/*
MVCDemos/*
bundles/*
NetCoreDemos/*
publish-demos/*
JSDemos/Demos/**/testcafe-test-code.js
/**/azure.file.system.js

JSDemos/Demos/**/config.js
JSDemos/Demos/**/Vue/**/*.html
67 changes: 67 additions & 0 deletions .github/workflows/build-aspnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build aspnet demos

concurrency:
group: wf-${{ github.event.pull_request.number || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

on:
pull_request:
push:
branches:
- "[0-9][0-9]_[0-9]"

jobs:
build:
name: Build aspnet demos
runs-on: windows-2019
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == false

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

- name: Get version
id: get_version
run: |
$env:version=$(node -p -e "require('./package.json').version.slice(0, 4).replace('.', '_')")
echo "version=$env:version" >> $GITHUB_OUTPUT
- name: Clone devextreme-aspnet repo
uses: actions/checkout@v4
with:
repository: DevExpress/devextreme-aspnet
ref: ${{ steps.get_version.outputs.version }}
path: devextreme-aspnet
token: ${{ secrets.ASPNET_PAT }}

- name: Restore npm cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}

- name: Run npm install
run: npm install --no-audit --no-fund

- name: Update repository.config.json
run: |
$jsonData = Get-Content -Raw -Path "repository.config.json" | ConvertFrom-Json
$jsonData.DevExtreme = "${{ github.workspace }}\DevExtreme"
$jsonData."devextreme-aspnet" = "${{ github.workspace }}\devextreme-aspnet"
$jsonData | ConvertTo-Json | Set-Content -Path "repository.config.json"
- name: Run prepare-aspnet
run: npm run prepare-aspnet

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Build MVC demos
working-directory: MVCDemos
run: |
nuget restore DevExtreme.MVC.Demos.sln
msbuild DevExtreme.MVC.Demos.sln
- name: Build Core demos
working-directory: NetCoreDemos
run: dotnet build DevExtreme.NETCore.Demos.sln
37 changes: 0 additions & 37 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,4 @@ jobs:
npm install --no-audit --no-fund --ignore-scripts
git diff --exit-code package-lock.json
check_generated_demos:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Get sources
uses: actions/checkout@v3

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

- name: Restore npm cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-modules

- name: Check generated JS demos
run: |
npm install --no-audit --no-fund --ignore-scripts
git reset --hard
npm run convert-to-js ./JSDemos/Demos/**/React
git add ./JSDemos/Demos -N
if git diff --exit-code ; then
echo "Generated JS demos are up-to-date"
else
echo "Generated JS demos are outdated. Execute 'npm run convert-to-js ./JSDemos/Demos/**/React' and commit changes."
echo "If you see another diff, ensure that extra listed files have LF endings."
exit 1
fi
46 changes: 46 additions & 0 deletions .github/workflows/publish-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Demos to GH Pages

on:
workflow_dispatch:
push:
tags:
- 'release-*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install jq
run: sudo apt-get install -y jq

- name: Read version from package.json and append "-stable"
run: echo echo "STABLE_VERSION=$(jq -r '.version' package.json | awk -F. '{print $1 "." $2}')-stable" >> $GITHUB_ENV

- name: Install Dependencies
run: npm install

- name: Install stable devextreme pacakges
run: npm install devextreme@${{ env.STABLE_VERSION }} devextreme-angular@${{ env.STABLE_VERSION }} devextreme-react@${{ env.STABLE_VERSION }} devextreme-vue@${{ env.STABLE_VERSION }}

- name: Copy metadata
run: npm run make-demos-bundle -- --copy-metadata

- name: Prepare React demo bundles
run: npm run make-demos-bundle -- --framework React

- name: Prepare Vue demo bundles
run: npm run make-demos-bundle -- --framework Vue

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publish-demos
4 changes: 2 additions & 2 deletions .github/workflows/visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: actions/cache@v3
with:
path: 'devextreme-repo/**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('devextreme-repo/**/package-lock.json') }}
key: ${{ runner.os }}-devextreme-node-modules-${{ hashFiles('devextreme-repo/**/package-lock.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v3
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
steps:
- name: Pin Chrome version
run: |
CHROME_VERSION=116.0.5845.110
CHROME_VERSION=117.0.5938.92
wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb"
sudo dpkg -i "google-chrome-stable_${CHROME_VERSION}-1_amd64.deb"
Expand Down
109 changes: 96 additions & 13 deletions .github/workflows/visual_tests_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: actions/cache@v3
with:
path: 'devextreme/**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('devextreme/**/package-lock.json') }}
key: ${{ runner.os }}-devextreme-node-modules-${{ hashFiles('devextreme/**/package-lock.json') }}

- name: Use Node.js 18
uses: actions/setup-node@v3
Expand Down Expand Up @@ -150,8 +150,6 @@ jobs:
with:
path: ./node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules

- name: Delete DX packages
run: sed -i '/23.2-next/d' ./package.json
Expand Down Expand Up @@ -187,17 +185,39 @@ jobs:
retention-days: 1

lint:
name: Lint code base
needs:
- build-demos
name: ${{ matrix.name }}
needs: build-devextreme

runs-on: ubuntu-latest
timeout-minutes: 60

strategy:
fail-fast: false
matrix:
include:
- name: Lint code base (excluding demos)
command: npm run lint-non-demos
- name: Lint demos (1/4)
command: CONSTEL=1/4 npm run lint-demos
- name: Lint demos (2/4)
command: CONSTEL=2/4 npm run lint-demos
- name: Lint demos (3/4)
command: CONSTEL=3/4 npm run lint-demos
- name: Lint demos (4/4)
command: CONSTEL=4/4 npm run lint-demos

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

- name: Get changed files
uses: ./.github/actions/get-changed-files
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'force all tests')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: changed-files.json

- name: Delete DX packages
run: sed -i '/23.2-next/d' ./package.json

Expand All @@ -206,9 +226,6 @@ jobs:
with:
name: devextreme-sources

- name: Unpack artifacts
run: 7z x node_modules.7z

- name: Install packages
run: |
npm install devextreme-installer.tgz
Expand All @@ -230,7 +247,73 @@ jobs:
dotnet tool install -g dotnet-format --version 5.1.225507
- name: Run lint
run: npm run lint
env:
CHANGEDFILEINFOSPATH: ${{ github.workspace }}/changed-files.json
DEBUG: 'eslint:cli-engine,stylelint:standalone'
run: ${{ matrix.command }}

check_generated_demos:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build-demos
strategy:
fail-fast: false
matrix:
include:
- name: Check generated demos (1/5)
command: CONSTEL=1/5 npm run convert-to-js
- name: Check generated demos (2/5)
command: CONSTEL=2/5 npm run convert-to-js
- name: Check generated demos (3/5)
command: CONSTEL=3/5 npm run convert-to-js
- name: Check generated demos (4/5)
command: CONSTEL=4/5 npm run convert-to-js
- name: Check generated demos (5/5)
command: CONSTEL=5/5 npm run convert-to-js
steps:
- name: Get sources
uses: actions/checkout@v3

- name: Delete DX packages
run: sed -i '/23.2-next/d' ./package.json

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

- name: Unpack artifacts
run: 7z x node_modules.7z

- name: Install packages
run: |
npm install devextreme-installer.tgz
npm install devextreme-dist-installer.tgz
npm install devextreme-react-installer.tgz
npm install devextreme-vue-installer.tgz
npm install devextreme-angular-installer.tgz
- name: Run npm install
run: npm install --no-audit --no-fund

- name: Prepare JS
run: npm run prepare-js

- name: Check generated JS demos
run: |
${{ matrix.command }}
git add ./JSDemos/Demos -N
if git diff --exit-code . ':!package-lock.json' ':!package.json' ; then
echo "Generated JS demos are up-to-date"
else
echo "Generated JS demos are outdated. Execute 'npm run convert-to-js ./JSDemos/Demos/**/React' and commit changes."
echo "If you see another diff, ensure that extra listed files have LF endings."
exit 1
fi
testcafe:
needs: build-demos
Expand All @@ -246,7 +329,7 @@ jobs:
steps:
- name: Pin Chrome version
run: |
CHROME_VERSION=116.0.5845.110
CHROME_VERSION=117.0.5938.92
wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb"
sudo dpkg -i "google-chrome-stable_${CHROME_VERSION}-1_amd64.deb"
Expand All @@ -267,8 +350,8 @@ jobs:
- name: Prepare JS
run: npm run prepare-js

- name: Prepare Bundles
run: npx gulp bundles
- name: Update bundles config
run: npx gulp update-config

- name: Run Web Server
run: |
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ bin
obj
lib
NuGet
.vscode
.vscode/*
.idea
.vs
.idea
Expand All @@ -21,13 +21,15 @@ screenshots
bundles
changed-files.json

!.vscode/settings.json
gulpfile.js/.eslintrc.js

**/azure.file.system.js
JSDemos/Demos/FileManager/AzureClientBinding/Angular/app/app.service.ts
JSDemos/Demos/FileUploader/AzureDirectUploading/Angular/app/app.service.ts

JSDemos/Demos/**/config.js
JSDemos/Demos/**/tsconfig.json

MVCDemos/App_Data/Northwind.mdf
MVCDemos/Content/icons
Expand Down Expand Up @@ -56,3 +58,4 @@ NetCoreDemos/menuMeta.json
NetCoreDemos/wwwroot/bundle.min.css
NetCoreDemos/wwwroot/bundle.min.js
.DS_Store
publish-demos
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
*.json
MVCDemos
NetCoreDemos
.github
.github
publish-demos
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
MVCDemos
NetCoreDemos
publish-demos
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.tabSize": 2,
}
Loading

0 comments on commit 63addb4

Please sign in to comment.