-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from nixel2007/develop
0.6.0
- Loading branch information
Showing
42 changed files
with
2,298 additions
and
1,595 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,74 @@ | ||
# MIT License | ||
# Copyright (C) 2020 Tymko Oleg <olegtymko@yandex.ru> and contributors | ||
# All rights reserved. | ||
|
||
name: Контроль качества | ||
# Любой пуш и pr в проекте но с фильтром по основному проекту | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
if: (github.repository == 'nixel2007/oscript-fluent') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
oscript_version: ['stable'] | ||
|
||
steps: | ||
# Загрузка проекта | ||
- name: Актуализация | ||
uses: actions/checkout@v2 | ||
|
||
# Вычисление имени ветки | ||
- name: Compute branch name | ||
uses: nelonoel/branch-name@v1.0.1 | ||
|
||
# Установка OneScript конкретной версии | ||
- name: Установка OneScript | ||
uses: otymko/setup-onescript@v1.1 | ||
with: | ||
version: ${{ matrix.oscript_version }} | ||
|
||
# Установка зависимостей пакета | ||
- name: Установка зависимостей | ||
run: | | ||
opm install opm | ||
opm install -l --dev | ||
# Запуск тестов и сбор покрытия кода | ||
- name: Покрытие кода | ||
run: oscript ./tasks/coverage.os | ||
|
||
- name: Извлечение версии пакета | ||
shell: bash | ||
run: echo "##[set-output name=version;]`cat packagedef | grep ".Версия(" | sed 's|[^"]*"||' | sed -r 's/".+//'`" | ||
id: extract_version | ||
|
||
- name: Setup sonarqube | ||
uses: warchant/setup-sonar-scanner@v3 | ||
|
||
# Анализ проекта в SonarQube (ветка) | ||
- name: Анализ в SonarQube (branch) | ||
if: github.event_name == 'push' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: sonar-scanner | ||
-Dsonar.host.url=https://sonar.openbsl.ru | ||
-Dsonar.branch.name=${{ env.BRANCH_NAME }} | ||
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }} | ||
|
||
# Анализ проекта в SonarQube (PR) | ||
# https://docs.sonarqube.org/latest/analysis/pull-request/ | ||
- name: Анализ в SonarQube (pull-request) | ||
if: github.event_name == 'pull_request' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: sonar-scanner | ||
-Dsonar.host.url=https://sonar.openbsl.ru | ||
-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 }} | ||
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }} |
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,19 @@ | ||
name: Automatic Rebase | ||
on: | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
rebase: | ||
name: Rebase | ||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/rebase@1.8 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,57 @@ | ||
# MIT License | ||
# Copyright (C) 2020 Tymko Oleg <olegtymko@yandex.ru> and contributors | ||
# All rights reserved. | ||
|
||
name: Подготовка релиза и публикация в хабе | ||
# Только события создания и изменения релиза | ||
on: | ||
release: | ||
types: [published, edited] | ||
|
||
env: | ||
PACKAGE_MASK: fluent-*.ospx | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
oscript_version: ['stable'] | ||
|
||
steps: | ||
# Загрузка проекта | ||
- name: Актуализация | ||
uses: actions/checkout@v2 | ||
|
||
# Установка OneScript конкретной версии | ||
- name: Установка OneScript | ||
uses: otymko/setup-onescript@v1.1 | ||
with: | ||
version: ${{ matrix.oscript_version }} | ||
|
||
# Установка зависимостей пакета | ||
- name: Установка зависимостей | ||
run: | | ||
opm install opm | ||
opm install | ||
- name: Сборка пакета | ||
run: opm build . | ||
|
||
- name: Заливка артефактов | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: package.zip | ||
path: ./${{ env.PACKAGE_MASK }} | ||
|
||
#- name: Заливка в релиз | ||
# uses: AButler/upload-release-assets@v2.0.2 | ||
# with: | ||
# files: ./${{ env.PACKAGE_MASK }} | ||
# repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Публикация в hub.oscript.io | ||
shell: bash | ||
run: opm push -f ./${{ env.PACKAGE_MASK }} --token ${{ secrets.PUSH_TOKEN }} -c stable |
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,37 @@ | ||
# MIT License | ||
# Copyright (C) 2020 Tymko Oleg <olegtymko@yandex.ru> and contributors | ||
# All rights reserved. | ||
|
||
name: Тестирование | ||
# Любой пуш и pr в проекте | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
oscript_version: ['1.8.3', 'stable'] | ||
|
||
steps: | ||
# Загрузка проекта | ||
- name: Актуализация | ||
uses: actions/checkout@v2 | ||
|
||
# Установка OneScript конкретной версии | ||
- name: Установка OneScript | ||
uses: otymko/setup-onescript@v1.1 | ||
with: | ||
version: ${{ matrix.oscript_version }} | ||
|
||
# Установка зависимостей пакета | ||
- name: Установка зависимостей | ||
run: | | ||
opm install opm | ||
opm install -l --dev | ||
# Задача тестирования, в результате ожидается успешное выполнение | ||
- name: Тестирование | ||
run: oscript ./tasks/test.os |
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,5 +1,7 @@ | ||
|
||
*.ospx | ||
coverage/ | ||
build/ | ||
.sonar/ | ||
.sonarlint/ | ||
.vscode | ||
oscript_modules/ |
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
Oops, something went wrong.