-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
8,369 additions
and
5,069 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*.bsl eol=crlf | ||
*.bat eol=crlf | ||
*.sh eol=lf | ||
*.json eol=crlf | ||
*.xml eol=crlf | ||
*.os eol=crlf | ||
*.md eol=crlf | ||
*.png filter=lfs diff=lfs merge=lfs -text | ||
*.cf filter=lfs diff=lfs merge=lfs -text | ||
*.dt filter=lfs diff=lfs merge=lfs -text | ||
*.bak filter=lfs diff=lfs merge=lfs -text | ||
*.bin filter=lfs diff=lfs merge=lfs -text | ||
*.epf filter=lfs diff=lfs merge=lfs -text | ||
*.erf filter=lfs diff=lfs merge=lfs -text | ||
*.tif filter=lfs diff=lfs merge=lfs -text | ||
*.pdf filter=lfs diff=lfs merge=lfs -text | ||
*.exe filter=lfs diff=lfs merge=lfs -text | ||
*.zip filter=lfs diff=lfs merge=lfs -text |
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,13 +1,11 @@ | ||
# MIT License | ||
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors | ||
# All rights reserved. | ||
|
||
name: Контроль качества | ||
# Любой пуш и pr в проекте но с фильтром по основному проекту | ||
on: [push, pull_request] | ||
|
||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
build: | ||
|
@@ -16,21 +14,16 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
oscript_version: ['1.4.0'] | ||
os: [cpdb] | ||
oscript_version: ['1.7.0'] | ||
|
||
steps: | ||
# Загрузка проекта | ||
- name: Актуализация | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions | ||
- name: Извлечение имени текущей ветки | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
lfs: true | ||
|
||
# Установка OneScript конкретной версии | ||
- name: Установка OneScript | ||
|
@@ -44,13 +37,39 @@ jobs: | |
opm install opm | ||
opm install --dev | ||
# Запуск контейнера NextCloud | ||
- name: Запуск контейнера NextCloud | ||
env: | ||
NC_ADDRESS: ${{ secrets.NC_ADDRESS }} | ||
NC_ADMIN_NAME: ${{ secrets.NC_ADMIN_NAME }} | ||
NC_ADMIN_PWD: ${{ secrets.NC_ADMIN_PWD }} | ||
run: ./tools/nextcloud/startenv.bat | ||
|
||
# Запуск тестов и сбор покрытия кода | ||
- name: Покрытие кода | ||
env: | ||
CPDB_SQL_SRVR: ${{ secrets.CPDB_SQL_SRVR }} | ||
CPDB_SQL_USER: ${{ secrets.CPDB_SQL_USER }} | ||
CPDB_SQL_PWD: ${{ secrets.CPDB_SQL_PWD }} | ||
NC_ADDRESS: ${{ secrets.NC_ADDRESS }} | ||
NC_ADMIN_NAME: ${{ secrets.NC_ADMIN_NAME }} | ||
NC_ADMIN_PWD: ${{ secrets.NC_ADMIN_PWD }} | ||
run: oscript ./tasks/coverage.os | ||
|
||
# Удаление контейнера NextCloud | ||
- name: Удаление контейнера NextCloud | ||
run: ./tools/nextcloud/stopenv.bat | ||
|
||
- name: Получение packagedef | ||
shell: pwsh | ||
run: echo "::set-output name=data::$(type packagedef)\n" | ||
id: packagedef_data | ||
|
||
- name: Извлечение версии пакета | ||
shell: bash | ||
run: echo "##[set-output name=version;]`cat packagedef | grep ".Версия(" | sed 's|[^"]*"||' | sed -r 's/".+//'`" | ||
uses: actions-ecosystem/action-regex-match@v2 | ||
with: | ||
text: ${{ steps.packagedef_data.outputs.data }} | ||
regex: '.Версия\("((?:\d+\.)+\d+)"\)' | ||
id: extract_version | ||
|
||
- name: Установка Sonar-scanner | ||
|
@@ -59,20 +78,22 @@ jobs: | |
# Анализ проекта в SonarQube (ветка) | ||
- name: Анализ в SonarQube (branch) | ||
if: github.event_name == 'push' | ||
shell: cmd | ||
run: sonar-scanner | ||
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} | ||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
-Dsonar.branch.name=${{ steps.extract_branch.outputs.branch }} | ||
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }} | ||
-Dsonar.branch.name=${{ env.BRANCH_NAME }} | ||
-Dsonar.projectVersion=${{ steps.extract_version.outputs.group1 }} | ||
|
||
# Анализ проекта в SonarQube (PR) | ||
# https://docs.sonarqube.org/latest/analysis/pull-request/ | ||
- name: Анализ в SonarQube (pull-request) | ||
if: github.event_name == 'pull_request' | ||
shell: cmd | ||
run: sonar-scanner | ||
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} | ||
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} | ||
-Dsonar.branch.name=${{ steps.extract_branch.outputs.branch }} | ||
-Dsonar.branch.name=${{ env.BRANCH_NAME }} | ||
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} | ||
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} | ||
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} | ||
|
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 was deleted.
Oops, something went wrong.
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,7 +1,5 @@ | ||
.vscode/*.* | ||
sonarlint.json | ||
|
||
\.sonar/ | ||
test-reports/ | ||
coverage/ | ||
build/ | ||
*.ospx |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.