Skip to content

Commit c9a1169

Browse files
authored
Merge pull request #3 from Stepa86/main
0.3.0
2 parents 26f99e6 + 1950d91 commit c9a1169

File tree

175 files changed

+7957
-501
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+7957
-501
lines changed

.bsl-language-server.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://1c-syntax.github.io/bsl-language-server/configuration/schema.json",
3+
"language": "ru",
4+
"diagnostics": {
5+
"computeTrigger": "onType",
6+
"parameters": {
7+
"LineLength": {
8+
"maxLineLength": 140
9+
},
10+
"TernaryOperatorUsage": true,
11+
"NestedFunctionInParameters": false
12+
}
13+
}
14+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/qa.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# MIT License
2+
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors
3+
# All rights reserved.
4+
5+
name: Контроль качества
6+
# Любой пуш и pr в проекте но с фильтром по основному проекту
7+
on: [push, pull_request]
8+
jobs:
9+
build:
10+
if: github.repository == 'Stepa86/v8metadata-reader'
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest]
16+
oscript_version: ['1.4.0']
17+
18+
steps:
19+
# Загрузка проекта
20+
- name: Актуализация
21+
uses: actions/checkout@v2
22+
23+
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
24+
- name: Извлечение имени текущей ветки
25+
shell: bash
26+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
27+
id: extract_branch
28+
29+
# Установка OneScript конкретной версии
30+
- name: Установка OneScript
31+
uses: otymko/[email protected]
32+
with:
33+
version: ${{ matrix.oscript_version }}
34+
35+
# Установка зависимостей пакета
36+
- name: Установка зависимостей
37+
run: |
38+
opm install opm
39+
opm install --dev
40+
41+
# Запуск тестов и сбор покрытия кода
42+
- name: Покрытие кода
43+
run: oscript ./tasks/coverage.os
44+
45+
- name: Извлечение версии пакета
46+
shell: bash
47+
run: echo "##[set-output name=version;]`cat packagedef | grep ".Версия(" | sed 's|[^"]*"||' | sed -r 's/".+//'`"
48+
id: extract_version
49+
50+
# - name: Установка Sonar-scanner
51+
# uses: warchant/setup-sonar-scanner@v1
52+
53+
# Анализ проекта в SonarQube (ветка)
54+
# - name: Анализ в SonarQube (branch)
55+
# if: github.event_name == 'push'
56+
# run: sonar-scanner
57+
# -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }}
58+
# -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
59+
# -Dsonar.branch.name=${{ steps.extract_branch.outputs.branch }}
60+
# -Dsonar.projectVersion=${{ steps.extract_version.outputs.version }}
61+
62+
# Анализ проекта в SonarQube (PR)
63+
# https://docs.sonarqube.org/latest/analysis/pull-request/
64+
# - name: Анализ в SonarQube (pull-request)
65+
# if: github.event_name == 'pull_request'
66+
# run: sonar-scanner
67+
# -Dsonar.login=${{ secrets.SONARQUBE_TOKEN }}
68+
# -Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
69+
# -Dsonar.branch.name=${{ steps.extract_branch.outputs.branch }}
70+
# -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
71+
# -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
72+
# -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
73+
# -Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# MIT License
2+
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors
3+
# All rights reserved.
4+
5+
name: Подготовка релиза и публикация в хабе
6+
# Только события создания и изменения релиза
7+
on:
8+
release:
9+
types: [published, edited]
10+
11+
env:
12+
PACKAGE_MASK: v8metadata-reader-*.ospx
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest]
21+
oscript_version: ['1.4.0']
22+
23+
steps:
24+
# Загрузка проекта
25+
- name: Актуализация
26+
uses: actions/checkout@v2
27+
28+
# Установка OneScript конкретной версии
29+
- name: Установка OneScript
30+
uses: otymko/[email protected]
31+
with:
32+
version: ${{ matrix.oscript_version }}
33+
34+
# Установка зависимостей пакета
35+
- name: Установка зависимостей
36+
run: |
37+
opm install opm
38+
opm install
39+
40+
- name: Сборка пакета
41+
run: opm build
42+
43+
- name: Заливка артефактов
44+
uses: actions/upload-artifact@v2
45+
with:
46+
name: package.zip
47+
path: ./${{ env.PACKAGE_MASK }}
48+
49+
- name: Заливка в релиз
50+
uses: AButler/[email protected]
51+
with:
52+
files: ./${{ env.PACKAGE_MASK }}
53+
repo-token: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: Публикация в hub.oscript.io
56+
shell: bash
57+
run: opm push -f ./${{ env.PACKAGE_MASK }} --token ${{ env.TOKEN }} -c stable
58+
env:
59+
TOKEN: ${{ secrets.OSHUB_TOKEN }}

.github/workflows/testing.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# MIT License
2+
# Copyright (C) 2020 Tymko Oleg <[email protected]> and contributors
3+
# All rights reserved.
4+
5+
name: Тестирование
6+
# Любой пуш и pr в проекте
7+
on: [push, pull_request]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest]
16+
oscript_version: ['1.4.0']
17+
18+
steps:
19+
# Загрузка проекта
20+
- name: Актуализация
21+
uses: actions/checkout@v2
22+
23+
# Установка OneScript конкретной версии
24+
- name: Установка OneScript
25+
uses: otymko/[email protected]
26+
with:
27+
version: ${{ matrix.oscript_version }}
28+
29+
# Установка зависимостей пакета
30+
- name: Установка зависимостей
31+
run: |
32+
opm install opm
33+
opm install --dev
34+
35+
# Задача тестирования, в результате ожидается успешное выполнение
36+
- name: Тестирование
37+
run: oscript ./tasks/test.os

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
test
2-
.vscode
31
*.ospx
2+
tests.xml
3+
oscript_modules/

.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// Используйте IntelliSense, чтобы узнать о возможных атрибутах.
3+
// Наведите указатель мыши, чтобы просмотреть описания существующих атрибутов.
4+
// Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Отладка",
9+
"type": "oscript",
10+
"request": "launch",
11+
"program": "${file}",
12+
"args": [],
13+
"cwd": "${workspaceRoot}",
14+
"runtimeExecutable": null,
15+
"debugPort": 2801,
16+
"protocol": "tcp"
17+
}
18+
]
19+
}

0 commit comments

Comments
 (0)