Skip to content

Commit

Permalink
ci: рефакторинг пайплайна тестирования
Browse files Browse the repository at this point in the history
  • Loading branch information
alkoleft committed Aug 29, 2024
1 parent 1c9fc48 commit e1d6df9
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 323 deletions.
6 changes: 5 additions & 1 deletion .github/actions/extract-version/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Извлечение версии
description: Извлечение версии из исходников
inputs:
path:
description: 'Путь к исходникам'
required: true
outputs:
version:
description: 'Версия'
Expand All @@ -9,5 +13,5 @@ runs:
steps:
- name: Извлечение версии
shell: bash
run: echo "version=$(cat ./exts/yaxunit/src/Configuration/Configuration.mdo | grep -oP '(?<=<version>)[\d.]+')" >> $GITHUB_OUTPUT
run: echo "version=$(cat ${{ inputs.path }}/Configuration/Configuration.mdo | grep -oP '(?<=<version>)[\d.]+')" >> $GITHUB_OUTPUT
id: extract_version
2 changes: 1 addition & 1 deletion .github/actions/load-extension/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ 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
timeout-minutes: 5
4 changes: 2 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-release
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-release
cancel-in-progress: true

permissions:
Expand All @@ -22,7 +22,7 @@ jobs:
secrets: inherit

build_artifacts:
name: Сборка артифактов
name: Сборка артефактов
runs-on: ubuntu-latest
needs: export_to_designer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches: [ develop ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-main
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-main
cancel-in-progress: true

permissions:
Expand All @@ -19,51 +19,39 @@ permissions:

jobs:
export_to_designer:
name: Конвертация исходников в формат конфигуратора
name: Конвертация исходников
uses: ./.github/workflows/step-export-xml.yml
with:
edt_version: 2023.1.2
artifact_name: designer-src
secrets: inherit

build_artifacts:
name: Сборка артифактов
name: Сборка
uses: ./.github/workflows/step-build-artifacts-windows.yml
needs: export_to_designer
with:
v8_version: 8.3.21.1895
secrets: inherit

tests_windows:
name: Тестирование в Windows
tests:
name: Тест
strategy:
fail-fast: false
matrix:
v8_version:
version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-windows.yml
needs: build_artifacts
with:
v8_version: ${{ matrix.v8_version }}
locale: ${{ matrix.locale }}
secrets: inherit
os:
- windows-latest
- ubuntu-latest

tests_linux:
name: Тестирование в Linux
strategy:
fail-fast: false
matrix:
v8_version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-linux.yml
uses: ./.github/workflows/step-run-tests.yml
needs: build_artifacts
with:
v8_version: ${{ matrix.v8_version }}
v8_version: ${{ matrix.version }}
locale: ${{ matrix.locale }}
os: ${{ matrix.os }}
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ jobs:

- name: Извлечение версии проекта
uses: ./.github/actions/extract-version
with:
path: ./exts/yaxunit/src
id: extract_version

- name: Установка сканера Sonar
uses: warchant/setup-sonar-scanner@v8
with:
version: 6.1.0.4477

# Анализ проекта в SonarQube (ветка)
- name: Анализ в SonarQube (${{ github.ref_name }})
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/step-build-artifacts-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
default: build-artifacts

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-build
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-build
cancel-in-progress: true

jobs:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/step-export-xml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ on:
value: ${{ jobs.export.outputs.yaxunit_version }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.number }}-export
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-export
cancel-in-progress: true

jobs:
export:
name: Конвертация исходников
name: Конвертация
runs-on: ubuntu-latest
outputs:
yaxunit_version: ${{ steps.extract_version.outputs.version }}
Expand All @@ -43,6 +43,8 @@ jobs:

- name: Извлечение версии проекта
uses: ./.github/actions/extract-version
with:
path: ./exts/yaxunit/src
id: extract_version

- name: Установка 1C:EDT
Expand Down
171 changes: 0 additions & 171 deletions .github/workflows/step-run-tests-linux.yml

This file was deleted.

Loading

0 comments on commit e1d6df9

Please sign in to comment.