Skip to content
Merged
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
19 changes: 11 additions & 8 deletions .github/workflows/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
pull_request:
workflow_call:
inputs:
external-tools-version:
description: 'Version of external tools'
default: latest
deps-version-tag:
description: 'Version tag of scaffolder and framework'
default: ''
required: false
type: string

Expand All @@ -21,16 +21,19 @@ jobs:
- vue-v3
- react
- react-ts
- react-swc
- react-swc-ts
- nextjs
- nextjs-ts
NODE:
- 18
OS:
- ubuntu-latest
- windows-latest

runs-on: ${{ matrix.OS }}
env:
VUE_CLI_CONFIG_PATH: $GITHUB_WORKSPACE/.vuerc
TOOLING_VERSION_PARAM: ${{ inputs.external-tools-version != '' && format('--tooling-version {0}', inputs.external-tools-version) || '' }}
DEPS_VERSION_TAG_PARAM: ${{ inputs.deps-version-tag != '' && format('--deps-version-tag {0}', inputs.deps-version-tag) || '' }}

name: ${{ matrix.APPROACH }}, node ${{ matrix.NODE }}, ${{ matrix.OS }}

Expand All @@ -52,7 +55,7 @@ jobs:
run: npm config set legacy-peer-deps true

- name: Create ${{ matrix.APPROACH }} application
run: npm run create-template -- -- -e ${{ matrix.APPROACH }} ${{ env.TOOLING_VERSION_PARAM }}
run: npm run create-template -- -- -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
timeout-minutes: 30

- name: Install Internal Packages
Expand All @@ -62,14 +65,14 @@ jobs:

- name: Lint created application
if: ${{ matrix.OS != 'windows-latest' }}
run: npm run lint-template -- -- -e ${{ matrix.APPROACH }} ${{ env.TOOLING_VERSION_PARAM }}
run: npm run lint-template -- -- -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}

- name: Run template tests
if: ${{ matrix.OS != 'windows-latest' }}
env:
LAUNCH_BROWSER: true
CHROME_PATH: ${{ steps.setup-chrome.outputs.chrome-path }}
run: npm run test-template -- -- -e ${{ matrix.APPROACH }} ${{ env.TOOLING_VERSION_PARAM }}
run: npm run test-template -- -- -e ${{ matrix.APPROACH }} ${{ env.DEPS_VERSION_TAG_PARAM }}
timeout-minutes: 40

- name: Archive artifacts
Expand Down
94 changes: 94 additions & 0 deletions .github/workflows/check-nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Check "add devextreme-react" for NextJS app

on:
push:
pull_request:
workflow_dispatch:

jobs:
nextjs-devextreme-test:
strategy:
fail-fast: false
matrix:
TYPESCRIPT: [true, false]
SRC_DIR: [true, false]
APP_ROUTER: [true, false]
NODE:
- 18
OS:
- ubuntu-latest

runs-on: ${{ matrix.OS }}
name: Next.js + DevExtreme (TS:${{ matrix.TYPESCRIPT }}, src:${{ matrix.SRC_DIR }}, app-router:${{ matrix.APP_ROUTER }}), node ${{ matrix.NODE }}, ${{ matrix.OS }}

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.NODE }}
cache: 'npm'

- name: Extract create-next-app version
run: |
NEXT_APP_VERSION=$(node -e "const versions = require('./packages/devextreme-cli/src/utility/latest-versions.js'); console.log(versions['create-next-app'])")
echo "Using create-next-app version: $NEXT_APP_VERSION"
echo "NEXT_APP_VERSION=$NEXT_APP_VERSION" >> $GITHUB_ENV
shell: bash

- name: Create Next.js application
run: |
npx create-next-app@${{ env.NEXT_APP_VERSION }} test-nextjs-app \
--typescript=${{ matrix.TYPESCRIPT }} \
--src-dir=${{ matrix.SRC_DIR }} \
--app=${{ matrix.APP_ROUTER }} \
--eslint \
--no-tailwind \
--import-alias="@/*" \
--no-git \
--use-npm
shell: bash

- name: Add actual devExtreme-cli
run: |
cd test-nextjs-app
npm add devextreme-cli
rm -r ./node_modules/devextreme-cli/src/
cp -r ../packages/devextreme-cli/src/ ./node_modules/devextreme-cli/
ls ./node_modules/devextreme-cli
ls ./node_modules/devextreme-cli/src
shell: bash
timeout-minutes: 15

- name: Add DevExtreme to Next.js application
run: |
cd test-nextjs-app
npx devextreme-cli add devextreme-react
shell: bash
timeout-minutes: 15

- name: Verify DevExtreme dependencies in package.json
run: |
cd test-nextjs-app

if ! grep -q '"devextreme":' package.json; then
echo "Error: devextreme dependency not found in package.json"
exit 1
fi

if ! grep -q '"devextreme-react":' package.json; then
echo "Error: devextreme-react dependency not found in package.json"
exit 1
fi

echo "DevExtreme dependencies successfully installed"
shell: bash

- name: Build Next.js application
run: |
cd test-nextjs-app
npm run build
shell: bash
timeout-minutes: 15
2 changes: 1 addition & 1 deletion .github/workflows/schedule-cli-tests-latest-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Run CLI tests
uses: ./.github/workflows/applications.yml
with:
external-tools-version: latest
deps-version-tag: latest

teams_notification_on_failure:
name: Send Teams notification
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/schedule-cli-tests-next-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Schedule tests for next versions of external CLIs

on:
workflow_dispatch:
schedule:
- cron: "0 1 * * 1"
# schedule:
# - cron: "0 1 * * 1"

jobs:
call_tests_workflow:
name: Run CLI tests
uses: ./.github/workflows/applications.yml
with:
external-tools-version: next
deps-version-tag: next

teams_notification_on_failure:
name: Send Teams notification
Expand Down
Loading
Loading