Skip to content

Commit

Permalink
Merge branch 'release/23.04'
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-tech committed Apr 28, 2023
2 parents a0d45db + c7f75d4 commit abbd848
Show file tree
Hide file tree
Showing 206 changed files with 8,711 additions and 5,179 deletions.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"

45 changes: 45 additions & 0 deletions .github/workflows/publish-documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish documentation
on:
workflow_dispatch:
push:
branches:
- master
- develop
paths:
- 'docs/**'
- 'README.md'
- '.github/workflows/publish-documentation.yaml'
jobs:
publish:
name: Publish documentation to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Get latest GitHub Pages
run: |
wget https://github.com/${{ github.repository }}/archive/gh-pages.zip
unzip gh-pages.zip
mkdir public -p
cp -R ${GITHUB_REPOSITORY#*/}-gh-pages/. public
- name: Copy master documentation
if: github.ref == 'refs/heads/master'
run: |
cp README.md public/
cp -R docs public/
- name: Copy develop documentation
if: github.ref == 'refs/heads/develop'
run: |
mkdir public/dev -p
cp README.md public/dev/
cp -R docs public/dev/
- name: Deploy
uses: peaceiris/[email protected]
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./public
enable_jekyll: true
65 changes: 65 additions & 0 deletions .github/workflows/publish-update-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Publish update-site
on:
workflow_dispatch:
push:
branches:
- master
- develop
paths:
- 'viewer/**'
- 'templates/eclipse_project/**'
- '.github/workflows/publish-update-site.yaml'
jobs:
publish:
name: Publish update-site to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'liberica'
java-package: jdk+fx # нужен FX
architecture: x64
cache: 'maven'
server-id: dt_repository # реджестри пакетов 1С
server-username: ${{ secrets.MAVEN_USERNAME }} # храниться в секретах
server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} # храниться в секретах в открытом виде

- name: Get latest GitHub Pages
run: |
wget https://github.com/${{ github.repository }}/archive/gh-pages.zip
unzip gh-pages.zip
mkdir public -p
cp -R ${GITHUB_REPOSITORY#*/}-gh-pages/. public
- name: Build master update site
if: github.ref == 'refs/heads/master'
run: |
export publication_location=../../../public/repository
export MAVEN_OPTS=
./gradlew download-lombok-plugin
export MAVEN_OPTS=-javaagent:target/lombok.jar=ECJ
./gradlew publishPlugin
- name: Build develop update site
if: github.ref == 'refs/heads/develop'
run: |
export publication_location=../../../public/dev/repository
export site_label_suffix='DEV. '
export MAVEN_OPTS=
./gradlew download-lombok-plugin
export MAVEN_OPTS=-javaagent:target/lombok.jar=ECJ
./gradlew publishPlugin
- name: Deploy
uses: peaceiris/[email protected]
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./public
enable_jekyll: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
!/.idea/libraries/
!/.idea/runConfigurations/
!/.idea/copyright/
!/.idea/codeStyles/
*.prefs
/eclipse_project/workspace/
target/
bin/
build/
/.gradle/*
/gradle*
gradle.properties
!/gradlew*
*.hprof
*.orig
Expand Down
15 changes: 15 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/libraries/projectlombok_lombok.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Позволяет запускать и отлаживать тесты написанные на языке 1С:Предприятия.
* Просматривать результаты выполнения
* Поддерживает работу с тестовым движком [YAXUnit](https://github.com/bia-technologies/yaxunit), который используется для разработки и исполнения тестов.
* [И другие функции](docs/%D0%A4%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D0%B8.md)

Для начала использования вам необходимо:

Expand Down
48 changes: 33 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "ru.biatech.edt.xtest"
version = "22.10.0"
version = "23.04.0"
val vendor = "BIA-Technologies Limited Liability Company"
val createProjectYear = 2021
val licenseYear = if (Calendar.getInstance().get(Calendar.YEAR) == createProjectYear) "$createProjectYear"
Expand All @@ -19,6 +19,7 @@ val pluginBuildPath = layout.buildDirectory.dir("buildPlugin").get().asFile
val publishTo = (findProperty("publishTo") ?: "").toString()

var subProjects = arrayOf("viewer")
val mvnCommand = if (Os.isFamily(Os.FAMILY_WINDOWS)) "mvn.cmd" else "mvn"

repositories {
mavenCentral()
Expand Down Expand Up @@ -91,46 +92,63 @@ tasks.register<Copy>("buildPlugin-copyFiles") {
group = "build"
}

tasks.register<Exec>("buildPlugin") {
isIgnoreExitValue = true
tasks.register<Exec>("download-lombok-plugin") {
workingDir = pluginBuildPath
standardOutput = System.out

environment("MAVEN_OPTS", "-Dhttps.protocols=TLSv1.2")

if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine("mvn.cmd", "dependency:resolve", "package")
} else {
commandLine("mvn", "dependency:resolve", "package")
}

environment("MAVEN_OPTS", "")
commandLine(mvnCommand, "clean", "dependency:copy@get-lombok")
group = "build"
dependsOn(tasks.named("buildPlugin-copyFiles"))
}

tasks.register<Exec>("buildPlugin") {
workingDir = pluginBuildPath
standardOutput = System.out

environment("MAVEN_OPTS", "-javaagent:target/lombok.jar=ECJ -Dhttps.protocols=TLSv1.2")
commandLine(mvnCommand, "dependency:resolve", "package")

dependsOn(tasks.named("download-lombok-plugin"))
group = "build"
}

tasks.register<Copy>("publishToPath") {
doFirst{
if(publishTo==""){
doFirst {
if (publishTo == "") {
throw GradleException("You must specify a property 'publishTo' for the publish task is 'gradle.properties'")
}
}
from("$pluginBuildPath/repositories/repository/target/repository"){
from("$pluginBuildPath/repositories/repository/target/repository") {
into("$version")
into("latest")
}
from("$pluginBuildPath/repositories/repository/target/repository.zip"){
from("$pluginBuildPath/repositories/repository/target/repository.zip") {
into("$version")
into("latest")
}
into(publishTo)
group = "publish"
dependsOn(tasks.named("buildPlugin"))

doLast{
doLast {
print("Published to: $publishTo")
}
}

tasks.register<Exec>("publishPlugin") {
isIgnoreExitValue = true
workingDir = pluginBuildPath
standardOutput = System.out

val ghPagesPath = layout.buildDirectory.dir("buildPlugin").get().asFile
commandLine(mvnCommand, "dependency:resolve", "deploy", "-Prelease-composite")

dependsOn(tasks.named("buildPlugin-copyFiles"))
group = "build"
}

tasks.wrapper {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = "7.1.1"
Expand Down
Binary file added docs/images/auto-update.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/goto-referenced-method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/install-from-rep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/module-launch-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions docs/Схема наименования.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Схема наименования

## Схема наименования модулей

Все тесты должны располагаться в общих модулях.

Имя тестового модуля должно соответствовать шаблону `[Префикс типа объекта_][Имя проверяемого объект]{_Суффикс типа модуля}`, где суффикс не обязателен, но крайне желателен.

По правильно названному модулю мы можем с легкостью получить информацию о типе тестируемого объекта и его имени, а также тип его модуля, методы которого проверяем. Список поддерживаемых суффиксов и префиксов приведен в таблицах ниже.

### Префиксы типов объекта

| Тип тестируемого объекта | Префикс | Пример |
| ------------------------ | ------- | ------------------------------------------- |
| Общий модуль | ОМ_ | ОМ_ОбщегоНазначения |
| Регистр бухгалтерии | РБ_ | РБ_Хозрасчетный, РБ_Хозрасчетный_НЗ |
| Регистр накопления | РН_ | РН_ОстаткиНаСкладах, РН_ОстаткиНаСкладах_ММ |
| Регистр расчета | РР_ | РР_Зарплата, РР_Зарплата_НЗ |
| Регистр сведений | РС_ | РС_АдресныйКлассификатор |
| Бизнес процесс | БП_ | БП_Согласование |
| Справочник | Спр_ | Спр_Пользователи, Спр_Пользователи_МО |
| План счетов | ПС_ | ПС_Хозрасчетный |
| План видов расчета | ПВР_ | ПВР_Зарплатный |
| План видов характеристик | ПВХ_ | ПВХ_Субконто, ПВХ_Субконто_ММ |
| Документ | Док_ | Док_ПКО |
| Перечисление | Пер_ | Пер_СтатусСогласования |
| План обмена | ПО_ | ПО_РИБ, ПО_РИБ_ММ |
| Задача | Зад_ | Зад_Задача |
| Обработка | Обр_ | Обр_ЗакрытиеМесяца, Обр_ЗакрытиеМесяца_МО |
| Отчет | Отч_ | Отч_УниверсальныйОтчет |

### Суффиксы типов модулей

| Тип тестируемого модуля | Суффикс | Пример |
| ----------------------- | -------------- | ------------------------------------------ |
| Общий модуль | <Без суффикса> | ОМ_ОбщегоНазначения |
| Модуль объекта | _МО | Спр_Пользователи_МО, Обр_ЗакрытиеМесяца_МО |
| Модуль менеджера | _ММ | ПВХ_Субконто_ММ, ПО_РИБ_ММ |
| Модуль набора записей | _НЗ | РБ_Хозрасчетный_НЗ, РР_Зарплата_НЗ |
19 changes: 19 additions & 0 deletions docs/Установка.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Установка плагина в EDT (Eclipse)

## Установка из p2 репозитория

1. Открываем EDT. Переходим к `Установить новое ПО` (в меню `Справка`)
2. Добавляем новый репозиторий, если еще не добавляли
* `https://bia-technologies.github.io/edt-test-runner/repository` - Основной репозиторий
* `https://bia-technologies.github.io/edt-test-runner/dev/repository` - Репозиторий develop
![Выбираем репозиторий](images/install-from-rep.png)
3. Для ускорения установки можно убрать галочку "Обращаться во время инсталляции ко всем сайтам ..."
4. Нажимаем далее
5. Принимаем лицензию
6. Соглашаемся с предупреждением безопасности (может выглядеть иначе)
![Соглашаемся с предупреждением безопасности](images/confirm-warning.png)
7. И перезагружаем IDE
8. В дальнейшем вы сможете автоматически получать обновления плагина
9. Также можно настроить автоматическую проверку обновлений (`Справка` -> `Проверить обновления`)
![Автообновление](images/auto-update.png)

## Установка оффлайн

1. [Скачиваем](https://github.com/bia-technologies/edt-test-runner/releases) архив последней версии
2. Переходим в EDT, устанавливаем новое ПО
![Выбираем репозиторий](images/select-repository.png)
Expand Down
Loading

0 comments on commit abbd848

Please sign in to comment.