Skip to content
Draft
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
5 changes: 0 additions & 5 deletions .github/actions/run-qunit-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ runs:
shell: bash
run: pnpm install

- name: Build dotnet
working-directory: ./packages/devextreme
shell: bash
run: dotnet build build/build-dotnet.sln

- name: Run QUnit tests
working-directory: ./packages/devextreme
shell: bash
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/qunit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ jobs:
working-directory: ./packages/devextreme
env:
DEVEXTREME_TEST_CI: "true"
DOTNET_CLI_TELEMETRY_OPTOUT: "true"
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "true"
BUILD_INPROGRESS_RENOVATION: "true"
run: pnpx nx build:systemjs

Expand Down
24 changes: 0 additions & 24 deletions packages/devextreme/build/build-dotnet.sln

This file was deleted.

11 changes: 7 additions & 4 deletions packages/devextreme/docker-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# 1. GITHUBACTION=true (GitHub Actions)
# - Runs NATIVELY on GitHub runner (NO Docker container!)
# - Uses pre-installed Chrome and dotnet
# - Uses pre-installed Chrome and Node.js
# - Dependencies already installed by workflow
# - Fastest and most stable mode
#
Expand Down Expand Up @@ -79,8 +79,11 @@ function run_test_impl {
pnpm run build
fi

echo "Starting ASP.NET Core test runner..."
dotnet ./testing/runner/bin/runner.dll --single-run & runner_pid=$!
echo "Compiling TypeScript test runner..."
pnpm exec tsc -p ./testing/runner/tsconfig.json

echo "Starting Node.js test runner..."
node ./testing/runner/dist/index.js --single-run & runner_pid=$!
echo "Runner PID: $runner_pid"

local max_attempts=30
Expand Down Expand Up @@ -241,7 +244,7 @@ function start_runner_watchdog {
echo "Watchdog running in background (PID: $watchdog_pid)"
}

echo "node $(node -v), pnpm $(pnpm -v), dotnet $(dotnet --version)"
echo "node $(node -v), pnpm $(pnpm -v)"

TARGET_FUNC="run_$TARGET"

Expand Down
29 changes: 25 additions & 4 deletions packages/devextreme/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import i18N from 'eslint-plugin-i18n';
import babelParser from '@babel/eslint-parser';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { createRequire } from 'node:module';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
Expand All @@ -17,12 +18,32 @@ import customRules from './eslint_plugins/index.js';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const require = createRequire(import.meta.url);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

function loadDevExtremeConfig(moduleName, legacyName) {
try {
const loadedModule = require(moduleName);
const normalized = loadedModule.default ?? loadedModule;

if (Array.isArray(normalized)) {
return normalized;
}

return compat.config(normalized);
} catch {
return compat.extends(legacyName);
}
}

const spellCheckConfig = loadDevExtremeConfig('eslint-config-devextreme/spell-check', 'devextreme/spell-check');
const typescriptConfig = loadDevExtremeConfig('eslint-config-devextreme/typescript', 'devextreme/typescript');
const qunitConfig = loadDevExtremeConfig('eslint-config-devextreme/qunit', 'devextreme/qunit');

export default [
{
ignores: [
Expand All @@ -43,7 +64,7 @@ export default [
'js/common/core/localization/default_messages.js',
],
},
...compat.extends('devextreme/spell-check'),
...spellCheckConfig,
{
plugins: {
'no-only-tests': noOnlyTests,
Expand Down Expand Up @@ -173,7 +194,7 @@ export default [
'import': importPlugin,
}
},
...compat.extends('devextreme/typescript').map(config => {
...typescriptConfig.map(config => {
const newConfig = {
...config,
files: ['**/*.ts?(x)'],
Expand Down Expand Up @@ -219,7 +240,7 @@ export default [
}],
},
},
...compat.extends('devextreme/typescript').map(config => {
...typescriptConfig.map(config => {
const newConfig = {
...config,
files: ['**/*.d.ts'],
Expand Down Expand Up @@ -259,7 +280,7 @@ export default [
}
},
// Rules for QUnit tests
...compat.extends('devextreme/qunit').map(config => ({
...qunitConfig.map(config => ({
...config,
files: ['testing/tests/**/*.js', 'testing/helpers/**/*.js'],
})),
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"build:testing-playground": "gulp build-renovation-testing:watch --playgroundName",
"build:community-localization": "gulp generate-community-locales",
"build:systemjs": "gulp transpile-systemjs",
"dev": "dotnet build build/build-dotnet.sln && cross-env DEVEXTREME_TEST_CI=true gulp dev",
"dev": "cross-env DEVEXTREME_TEST_CI=true gulp dev",
"dev:watch": "cross-env DEVEXTREME_TEST_CI=true gulp dev-watch",
"transpile-tests": "gulp transpile-tests",
"update-ts-reexports": "dx-tools generate-reexports --sources ./js --exclude \"((dialog|export|list_light|notify|overlay|palette|set_template_engine|splitter_control|themes|themes_callback|track_bar|utils|validation_engine|validation_message)[.d.ts])\" --compiler-options \"{ \\\"typeRoots\\\": [] }\"",
Expand Down
10 changes: 6 additions & 4 deletions packages/devextreme/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@
"^build"
],
"inputs": [
{ "env": "BUILD_TEST_INTERNAL_PACKAGE" },
{ "env": "DEVEXTREME_TEST_CI" },
{ "env": "DOTNET_CLI_TELEMETRY_OPTOUT" },
{ "env": "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" },
{
"env": "BUILD_TEST_INTERNAL_PACKAGE"
},
{
"env": "DEVEXTREME_TEST_CI"
},
"default",
"test"
],
Expand Down
16 changes: 13 additions & 3 deletions packages/devextreme/testing/launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const http = require('http');
const { join } = require('path');
const { spawn } = require('child_process');
const { spawn, spawnSync } = require('child_process');
const { platform } = require('os');
const { env, versions } = require('process');
const PORT = require('./../ports.json').qunit;
Expand All @@ -14,9 +14,19 @@ if(parseInt(versions.node.split('.')[0]) < 6) {
execRunner();

function execRunner () {
const tscResult = spawnSync(
'pnpm',
[ 'exec', 'tsc', '-p', join(__dirname, 'runner/tsconfig.json') ],
{ stdio: 'inherit', shell: true }
);

if(tscResult.status !== 0) {
throw 'Failed to compile testing runner';
}

spawn(
'dotnet',
[ join(__dirname, 'runner/bin/runner.dll') ],
'node',
[ join(__dirname, 'runner/dist/index.js') ],
{ stdio: 'inherit', shell: true }
);

Expand Down
1 change: 1 addition & 0 deletions packages/devextreme/testing/runner/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vs
launchSettings.json
*.user
dist
14 changes: 0 additions & 14 deletions packages/devextreme/testing/runner/.vscode/launch.json

This file was deleted.

13 changes: 0 additions & 13 deletions packages/devextreme/testing/runner/.vscode/tasks.json

This file was deleted.

Loading
Loading