Skip to content

Commit

Permalink
Merge branch 'develop' into feature/fix-sq-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
theshadowco authored Sep 14, 2024
2 parents 6bfdb4d + ec27197 commit 034bd7e
Show file tree
Hide file tree
Showing 382 changed files with 32,447 additions and 20,137 deletions.
22 changes: 21 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,26 @@ body:
attributes:
label: Версия 1С:Предприятие

- type: dropdown
id: run-mode
attributes:
label: Режим запуска 1С:Предприятие
multiple: true
options:
- Тонкий клиент. Управляемое приложение
- Толстый клиент. Управляемое приложение
- Обычное приложение
- Web-клиент

- type: dropdown
id: base-mode
attributes:
label: Тип информационной базы
multiple: true
options:
- Клиент-серверная
- Файловая

- type: dropdown
id: operating-systems
attributes:
Expand All @@ -40,4 +60,4 @@ body:
- Linux
- Windows
- Mac
- Other
- Other
17 changes: 17 additions & 0 deletions .github/actions/extract-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Извлечение версии
description: Извлечение версии из исходников
inputs:
path:
description: 'Путь к исходникам'
required: true
outputs:
version:
description: 'Версия'
value: ${{ steps.extract_version.outputs.version }}
runs:
using: "composite"
steps:
- name: Извлечение версии
shell: bash
run: echo "version=$(cat ${{ inputs.path }}/Configuration/Configuration.mdo | grep -oP '(?<=<version>)[\d.]+')" >> $GITHUB_OUTPUT
id: extract_version
18 changes: 18 additions & 0 deletions .github/actions/load-extension/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Загрузка расширения
description: Загрузка расширения в информационную базу с использованием ibcmd
inputs:
name:
description: 'Имя загружаемого расширения'
required: true
path:
description: 'Путь к файлу расширения'
required: true
runs:
using: "composite"
steps:
- name: Загрузка расширения ${{inputs.name}}
shell: bash
run: |
ibcmd infobase config load --db-path=file-db --extension=${{inputs.name}} --force ${{inputs.path}}
ibcmd infobase config apply --db-path=file-db --extension=${{inputs.name}} --force
ibcmd infobase config extension update --db-path=file-db --name=${{inputs.name}} --safe-mode=no --unsafe-action-protection=no
34 changes: 22 additions & 12 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Build release
name: Создание черновика релиза
on:
push:
tags:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-release
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-release
cancel-in-progress: true

permissions:
contents: write

jobs:
export_to_designer:
name: Export to designer xml
name: Конвертация исходников в формат конфигуратора
uses: ./.github/workflows/step-export-xml.yml
with:
edt_version: 2023.1.2
Expand All @@ -22,11 +22,12 @@ jobs:
secrets: inherit

build_artifacts:
name: Сборка артефактов
runs-on: ubuntu-latest
needs: export_to_designer

steps:
- name: install 8.3.21.1895
- name: Установка 1С:Предприятие 8.3.21.1895
uses: alkoleft/onec-setup-build-env-action@develop
with:
type: onec
Expand All @@ -36,35 +37,44 @@ jobs:
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
timeout-minutes: 10
- name: download artifact

- name: Загрузка исходников в формате конфигуратора
uses: actions/download-artifact@v4
with:
name: designer-src
- name: extract artifacts

- name: Распаковка исходников
run: |
mkdir export
cd export
7z x ../export.7z -y
- name: create IB
- name: Создание пустой информационной базы
run: ibcmd infobase create --db-path=file-db
timeout-minutes: 5

- name: import yaxunit
- name: Импорт YAxUnit из исходников
run: ibcmd infobase config import --db-path=file-db --extension=YAXUNIT export/yaxunit
timeout-minutes: 5

- name: save yaxunit
- name: Импорт Smoke из исходников
run: ibcmd infobase config import --db-path=file-db --extension=Smoke export/smoke
timeout-minutes: 5

- name: Сохрание расширения YAxUnit
run: ibcmd infobase config save --db-path=file-db --extension=YAXUNIT YAxUnit-${{ needs.export_to_designer.outputs.yaxunit_version }}.cfe
timeout-minutes: 5

- name: Release
- name: Сохрание расширения Smoke
run: ibcmd infobase config save --db-path=file-db --extension=Smoke Smoke-${{ needs.export_to_designer.outputs.smoke_version }}.cfe
timeout-minutes: 5

- name: Создание черновика релиза ${{ needs.export_to_designer.outputs.yaxunit_version }}
uses: softprops/action-gh-release@v2
if: ${{ success() }}
with:
draft: true
files: YAxUnit-*.cfe
files: '*.cfe'
fail_on_unmatched_files: true
generate_release_notes: true
append_body: false
Expand Down
27 changes: 17 additions & 10 deletions .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Documentation
name: Сборка документации

on:
push:
Expand All @@ -13,28 +13,35 @@ defaults:

jobs:
deploy:
name: Deploy to GitHub Pages
name: Сборка документации
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Download bsl doc
- name: Извлечение исходников
uses: actions/checkout@v4

- name: Скачивание BSL-Doc
run: curl -L https://github.com/alkoleft/bsldoc/releases/download/0.1.0/bsldoc-0.1.0.jar --output ./bsldoc.jar && chmod +7 ./bsldoc.jar
- name: Generate API documentation

- name: Генерация описания API
run: java -jar ./bsldoc.jar ./../exts/yaxunit ./api -f Docusaurus -s ЮТДвижок
- uses: actions/setup-node@v3

- name: Установка NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: 'documentation/package-lock.json'
cache-dependency-path: 'documentation/yarn.lock'

- name: Install dependencies
- name: Установка зависимостей Docusaurus
run: yarn install --frozen-lockfile
- name: Build website

- name: Сборка сайта с документацией
run: yarn build

# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
- name: Публикация на GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test
name: Тестирование
on:
push:
branches:
Expand All @@ -9,7 +9,7 @@ on:
branches: [ develop ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-main
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-main
cancel-in-progress: true

permissions:
Expand All @@ -19,49 +19,39 @@ permissions:

jobs:
export_to_designer:
name: Export to designer xml
name: Конвертация исходников
uses: ./.github/workflows/step-export-xml.yml
with:
edt_version: 2023.1.2
artifact_name: designer-src
secrets: inherit

build_artifacts:
name: Build artifacts
name: Сборка
uses: ./.github/workflows/step-build-artifacts-windows.yml
needs: export_to_designer
with:
v8_version: 8.3.21.1895
secrets: inherit

tests_windows:
tests:
name: Тест
strategy:
fail-fast: false
matrix:
v8_version:
version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-windows.yml
needs: build_artifacts
with:
v8_version: ${{ matrix.v8_version }}
locale: ${{ matrix.locale }}
secrets: inherit
os:
- windows-latest
- ubuntu-latest

tests_linux:
strategy:
fail-fast: false
matrix:
v8_version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-linux.yml
uses: ./.github/workflows/step-run-tests.yml
needs: build_artifacts
with:
v8_version: ${{ matrix.v8_version }}
v8_version: ${{ matrix.version }}
locale: ${{ matrix.locale }}
os: ${{ matrix.os }}
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: SonarQualityGate
name: Проверка Sonar

on:
- push
Expand All @@ -7,55 +7,50 @@ on:
jobs:
SonarQualityGate:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name
steps:

- name: Checkout PR
if: github.event_name != 'push'
- name: Извлечение исходников PR
if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.number }}/merge # Для поддержки pull_request и pull_request_target
fetch-depth: 0 # Получение полной истории (все тэги и ветки)

- name: Checkout ${{ github.ref_name }}
- name: Извлечение исходников ветки ${{ github.ref_name }}
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
fetch-depth: 0 # Получение полной истории (все тэги и ветки)

- name: Configure env vars for SonarCloud scan
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: |
echo "::set-env name=PATH::/opt/sonar-scanner/bin:$PATH"
- name: Extract version
if: github.event_name == 'push'
shell: bash
run: echo "version=$(cat ./exts/yaxunit/src/Configuration/Configuration.mdo | grep -oP '(?<=<version>)[\d.]+')" >> $GITHUB_OUTPUT
- name: Извлечение версии проекта
uses: ./.github/actions/extract-version
with:
path: ./exts/yaxunit/src
id: extract_version

- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v8

# Анализ проекта в SonarQube (ветка)
- name: Анализ в SonarQube (${{ github.ref_name }})
if: github.event_name == 'push'
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner
LC_ALL: "ru_RU.UTF-8"
with:
args: >
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.branch.name=${{ github.ref_name }}
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }}
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=300
# Анализ проекта в SonarQube (PR)
# https://docs.sonarqube.org/latest/analysis/pull-request/
# Анализ проекта в SonarQube (PR)
# https://docs.sonarqube.org/latest/analysis/pull-request/
- name: Анализ в SonarQube (pull-request ${{ github.event.number }})
if: github.event_name != 'push'
if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner
with:
args: >
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
Expand All @@ -64,11 +59,11 @@ jobs:
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=300
- name: Publish report (pull-request)
- name: Публикация результата проверки PR
if: github.event_name != 'push' && (success()||failure())
uses: 1CDevFlow/sonar-review-action@main
with:
sonar_branch_plugin: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


Loading

0 comments on commit 034bd7e

Please sign in to comment.