-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/fix-sq-issues
- Loading branch information
Showing
382 changed files
with
32,447 additions
and
20,137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: SonarQualityGate | ||
name: Проверка Sonar | ||
|
||
on: | ||
- push | ||
|
@@ -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 }} | ||
|
@@ -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 }} | ||
|
||
|
Oops, something went wrong.