Skip to content

Conversation

@ovcharenko-di
Copy link
Collaborator

В этом PR:

  • полноценное тестирование на GA (по аналогии с gitsync-plugins)
    • на двух версиях платформы 1С
    • тестирование на Windows и Linux
  • исправление падающих тестов
  • отключение сборки exe и всего, что с этим связано
  • обновление конфигов для VS Code
  • исправление опечаток, удаление лишнего
  • удаление Jenkinsfile и конфига для Travis-CI за ненадобностью

@oscript-library/Collaborators - пожалуйста, проверьте изменения и прокомментируйте их

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

TestsPassed ✅SkippedFailed
Результаты тестов. ОС: windows-latest. Версия 1С: 8.3.24.1691. Версия OneScript: 1.9.2428 ran428 passed0 skipped0 failed

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

TestsPassed ✅SkippedFailed
Результаты тестов. ОС: windows-latest. Версия 1С: 8.3.21.1624. Версия OneScript: 1.9.2428 ran428 passed0 skipped0 failed

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

TestsPassed ✅SkippedFailed
Результаты тестов. ОС: ubuntu-22.04. Версия 1С: 8.3.24.1691. Версия OneScript: 1.9.2428 ran428 passed0 skipped0 failed

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

TestsPassed ✅SkippedFailed
Результаты тестов. ОС: ubuntu-22.04. Версия 1С: 8.3.21.1624. Версия OneScript: 1.9.2428 ran428 passed0 skipped0 failed

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates gitsync to version 3.7.0 with plugins v2.0.0, introducing comprehensive GitHub Actions-based testing infrastructure while removing legacy CI/CD configurations (Travis CI and Jenkins). The changes modernize the testing approach, fix various spelling errors, and update all dependencies to newer versions.

Key Changes:

  • Implemented full GitHub Actions testing workflow with coverage collection and multi-platform support (Windows/Linux, multiple 1C platform versions)
  • Updated all package dependencies to newer versions (e.g., logos 1.7.1, v8runner 1.12.0, gitrunner 1.8.0)
  • Fixed numerous spelling errors throughout feature files and step definitions (e.g., "тестовой" → "тестовый", "ищю" → "ищу")
  • Refactored test execution to use centralized build/reports directory structure with improved coverage handling

Reviewed changes

Copilot reviewed 46 out of 47 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
travis-ci.sh Removed legacy Travis CI build script
Jenkinsfile Removed legacy Jenkins pipeline configuration
packagedef Updated version to 3.7.0 and upgraded all dependency versions
build_packagedef Updated version to 3.7.0 and environment version to 1.9.2
tasks/test.os Major refactoring: added coverage parameter support, centralized report outputs to build/reports, improved feature execution logic
tasks/coverage.os Added platform-specific encoding handling and reorganized coverage file structure
tasks/make.os Commented out EXE build functionality and removed commented debug code
tasks/build.os Removed commented-out code and debug statements
tasks/get-plugins.os Changed repository from khorevaa to oscript-library, renamed parameters from branch to commit pointer
tasks/oscript.cfg Changed lib.system to lib.additional for module path configuration
tests/fixtures/ext.yaml Fixed typo: "extention" → "extension"
.vscode/tasks.json Modernized to VS Code 2.0.0 task format with proper type, label, and presentation properties
.vscode/launch.json Removed debugPort and protocol fields from launch configuration
.gitignore Reorganized ignore patterns, added build/ directory
.gitattributes Added line ending rules for cross-platform compatibility
.bsl-language-server.json New BSL Language Server configuration file
.github/workflows/qa.yml Changed test command from "opm run coverage" to direct oscript execution
.github/CONTRIBUTING.md Improved formatting, updated instructions, and refreshed last update date
features/opm/opm-build.feature Fixed typo: "установку" → "установки"
features/core/sync.core.feature Fixed typo: "тестовой" → "тестовый", changed VERSION value from 0 to 7
features/core/sync.batch.feature Fixed typo: "тестовой" → "тестовый", removed commented-out test code
features/core/step_definitions/sync.batch.os Updated procedure names to match corrected spelling
features/core/step_definitions/shared.os Fixed spelling in comments and procedure names, added new step for git author setup, removed commented code
features/core/step_definitions/check.core.os Updated step names in list to match corrected capitalization
features/core/check.core.feature Fixed capitalization in step names
features/cmd/v8path.feature Fixed typo: "ищю" → "ищу", changed VERSION value from 0 to 7
features/cmd/sync.feature Fixed typo: "тестовой" → "тестовый", changed VERSION value from 0 to 7
features/cmd/step_definitions/v8path.os Updated procedure name to match corrected spelling
features/cmd/step_definitions/sync.core.os Removed extra blank lines
features/cmd/step_definitions/shared.os Fixed spelling in comments and procedure names, added new step for git author setup
features/cmd/step_definitions/init.os Removed extra blank lines
features/cmd/step_definitions/extension.os Added BSL diagnostic suppressions, improved comment formatting
features/cmd/step_definitions/all.os Fixed spelling in comment and procedure name, removed unused step
features/cmd/setversion.feature Fixed typo and whitespace, added git author setup step
features/cmd/ibconnection.feature Fixed typo, changed VERSION value from 0 to 7, added git author setup step
features/cmd/extention.feature Fixed typo, changed VERSION value from 0 to 4
features/cmd/clone.feature Added git author setup step, fixed trailing whitespace
features/cmd/all.feature Fixed spelling, improved table alignment and formatting
Comments suppressed due to low confidence (1)

travis-ci.sh:1

  • В CI-скрипте ранее использовалась команда наподобие curl http://oscript.io/downloads/$OSCRIPT_VERSION/deb для загрузки и установки пакета через dpkg -i, что позволяло атакующему с доступом к сети (MITM) подменить содержимое пакета и выполнить произвольный код в среде сборки. Для подобных установок необходимо использовать как минимум HTTPS-URL и, по возможности, проверку подписи или хэша загружаемого артефакта. Текущий PR удаляет этот скрипт и тем самым устраняет уязвимость; при восстановлении аналогичной логики важно использовать защищённый канал и проверку целостности.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Процедура ПолезнаяРабота(УказательКоммита)

URLРепозитория = "https://github.com/khorevaa/gitsync-plugins.git";
URLРепозитория = "https://github.com/oscript-library/gitsync-plugins.git";
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The URL for the plugins repository has been changed from "khorevaa/gitsync-plugins" to "oscript-library/gitsync-plugins". Please verify that this repository exists and is accessible at the new location, as this change could break the plugin installation process if the repository doesn't exist or requires different authentication.

Copilot uses AI. Check for mistakes.
Comment on lines 281 to 284
Если Не ФичиПрошли Тогда
ВызватьИсключение "Тестирование завершилось неудачно!";
Иначе
Сообщить(СтрШаблон("Результат прогона тестов <%1>
|", ТестыПрошли));
КонецЕсли;
КонецЕсли;
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition "Если Не ФичиПрошли Тогда" only checks if features passed but ignores the result of unit tests stored in "ТестыПрошли". This means unit test failures will not cause the overall test execution to fail. The original logic "Если Не ТестыПрошли Или Не ФичиПрошли Тогда" correctly checked both conditions.

Copilot uses AI. Check for mistakes.
Comment on lines +244 to +257
ТекКаталог = ТекущийКаталог();
КаталогФайловПокрытия = "";

Если АргументыКоманднойСтроки.Количество() = 0 Тогда
ТолькоЮнитТесты = Ложь;
Иначе
ТолькоЮнитТесты = Булево(АргументыКоманднойСтроки[0]);
КонецЕсли;
Для Каждого Элемент Из АргументыКоманднойСтроки Цикл
Если Элемент = "coverage" Тогда

КаталогФайловПокрытия = ОбъединитьПути(ТекущийКаталог(), ".", ИмяКаталогаФайловПокрытия);
ФС.ОбеспечитьПустойКаталог(КаталогФайловПокрытия);

// Попытка
// ТестыПрошли = ПрогнатьТесты();
Прервать;
КонецЕсли;
КонецЦикла;

// Исключение
// ТестыПрошли = Ложь;
// Сообщить(СтрШаблон("Тесты через 1testrunner выполнены неудачно
// |%1", ПодробноеПредставлениеОшибки(ИнформацияОбОшибке())));
// КонецПопытки;
УстановитьТекущийКаталог(ТекКаталог);
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable "ТекКаталог" is saved at line 244 but never used afterwards. The code sets the current directory back using "УстановитьТекущийКаталог(ТекКаталог)" at line 257, but there's no code between lines 244-257 that changes the current directory, making this operation unnecessary.

Copilot uses AI. Check for mistakes.
Comment on lines 8 to 14
"name": "Отладка 1Script",
"type": "oscript",
"request": "launch",
"program": "${file}",
"args": [],
"cwd": "${workspaceRoot}",
"runtimeExecutable": "/usr/bin/oscript",
"debugPort": 2801,
"protocol": "internal"
}
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "type" field has been removed from the launch configuration, but it's a required field for VS Code launch configurations. Without it, the debugger won't know which debug adapter to use. The original value "oscript" should be retained, or if debugging is no longer supported, the entire configuration should be removed or documented as non-functional.

Copilot uses AI. Check for mistakes.

//ТестовыйПлагин реализует ИнтерфейсаПлагинов
Процедура ТестовыйплагинРеализуетИнтерфейсаплагинов() Экспорт
Процедура ТестовыйплагинРеализуетИнтерфейсплагинов() Экспорт
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The procedure name "ТестовыйплагинРеализуетИнтерфейсплагинов" doesn't match the capitalization in the feature file which expects "ТестовыйПлагинРеализуетИнтерфейсПлагинов" (with capital letters in "Плагин" and "Плагинов"). This mismatch will cause BDD step matching to fail at runtime. The procedure name should use proper camel case: "ТестовыйПлагинРеализуетИнтерфейсПлагинов".

Copilot uses AI. Check for mistakes.
Comment on lines +279 to +280
Сообщить(СтрШаблон("Результат прогона основных фич <%1>
|", ФичиПрошли));
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message output at line 279 says "Результат прогона основных фич" (Result of running main features) but this doesn't accurately describe what's being checked. The variable "ФичиПрошли" represents the result of ALL features (core, cmd, exe, opm), not just "main" features. Consider using "Результат прогона всех фич" (Result of running all features) for clarity.

Copilot uses AI. Check for mistakes.

Если АргументыКоманднойСтроки.Количество() = 0 Тогда
ИмяВетки = "master";
УказательКоммита = "master";
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default branch name is hardcoded as "master". Consider using "main" as the default branch name instead, as this is now the GitHub standard and many repositories have migrated from "master" to "main". This could cause failures when trying to fetch from repositories that use "main" as their default branch.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to 21
Если НЕ ЭтоWindows Тогда
Команда.ДобавитьПараметр("-encoding=utf-8");
КонецЕсли;
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The encoding parameter is only added for non-Windows systems, but the encoding issue can occur on Windows as well depending on the console configuration. The "-encoding=utf-8" parameter should be added unconditionally to ensure consistent behavior across all platforms, especially since the codebase contains Cyrillic characters.

Copilot uses AI. Check for mistakes.
{
"taskName": "Exec feature",
"label": "Exec feature",
"type": "bsl",
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task type is set to "bsl" which is not a standard VS Code task type. Valid task types are "shell", "process", or task types provided by extensions. Unless there's a specific VSCode extension that provides the "bsl" task type, this should be "shell" to match the other tasks in this file.

Copilot uses AI. Check for mistakes.
//МенеджераПодписок реализует ИнтерфейсаПлагинов
Процедура МенеджераподписокРеализуетИнтерфейсаплагинов() Экспорт
//МенеджерПодписок реализует ИнтерфейсПлагинов
Процедура МенеджерподписокРеализуетИнтерфейсплагинов() Экспорт
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The procedure name "МенеджерподписокРеализуетИнтерфейсплагинов" doesn't match the capitalization in the feature file which expects "МенеджерПодписокРеализуетИнтерфейсПлагинов" (with capital letters in "Подписок" and "Плагинов"). This mismatch will cause BDD step matching to fail at runtime. The procedure name should use proper camel case: "МенеджерПодписокРеализуетИнтерфейсПлагинов".

Copilot uses AI. Check for mistakes.
@nixel2007
Copy link
Member

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants