Skip to content

Commit

Permalink
Merge branch 'release/v.1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Kuznetsov authored and Artem Kuznetsov committed Apr 8, 2022
2 parents cbde47e + 536d033 commit 36f995d
Show file tree
Hide file tree
Showing 87 changed files with 8,369 additions and 5,069 deletions.
18 changes: 18 additions & 0 deletions .gitattributes
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
55 changes: 38 additions & 17 deletions .github/workflows/qa.yml
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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
oscript_version: ['1.4.0']
oscript_version: ['1.7.0']

steps:
# Загрузка проекта
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/testing.yml

This file was deleted.

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.vscode/*.*
sonarlint.json

\.sonar/
test-reports/
coverage/
build/
*.ospx
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 36f995d

Please sign in to comment.