forked from bia-technologies/yaxunit
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (103 loc) · 3.53 KB
/
step-export-xml.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Конвертация исходников в формат конфигуратора
on:
workflow_call:
inputs:
edt_version:
type: string
required: true
artifact_name:
type: string
required: true
engine_only:
type: boolean
required: false
default: false
outputs:
yaxunit_version:
value: ${{ jobs.export.outputs.yaxunit_version }}
smoke_version:
value: ${{ jobs.export.outputs.smoke_version }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.number }}-export
cancel-in-progress: true
jobs:
export:
name: Конвертация
runs-on: ubuntu-latest
outputs:
yaxunit_version: ${{ steps.extract_version.outputs.version }}
smoke_version: ${{ steps.extract_smoke_version.outputs.version }}
steps:
- name: Извлечение исходников PR
if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.number }}/merge # Для поддержки pull_request и pull_request_target
- name: Извлечение исходников ветки ${{ github.ref_name }}
if: github.event_name == 'push'
uses: actions/checkout@v4
- name: Извлечение версии YAxUnit
uses: ./.github/actions/extract-version
with:
path: ./exts/yaxunit/src
id: extract_version
- name: Извлечение версии Smoke
uses: ./.github/actions/extract-version
with:
path: ./exts/yaxunit/src
id: extract_smoke_version
- name: Установка 1C:EDT
uses: 1CDevFlow/onec-setup-action@main
with:
type: edt
edt_version: ${{ inputs.edt_version }}
cache: true
env:
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
timeout-minutes: 30
- name: Ковертация исходников конфигурации
if: ${{ !inputs.engine_only }}
uses: alkoleft/onec-edtcli-command-action@main
with:
export: true
from: fixtures/demo-configuration
to: export/configuration
timeout: 5
timeout-minutes: 10
- name: Ковертация исходников YAxUnit
uses: alkoleft/onec-edtcli-command-action@main
with:
export: true
from: exts/yaxunit
to: export/yaxunit
timeout: 5
timeout-minutes: 10
- name: Ковертация исходников тестов
if: ${{ !inputs.engine_only }}
uses: alkoleft/onec-edtcli-command-action@main
with:
export: true
from: tests
to: export/tests
timeout: 5
timeout-minutes: 10
- name: Ковертация исходников дымовых тестов
uses: alkoleft/onec-edtcli-command-action@main
with:
export: true
from: exts/smoke
to: export/smoke
timeout: 5
timeout-minutes: 10
- name: Упаковка исходников в архив
run: |
cd export
7za a -t7z ../export.7z ./
- name: Публикация исходников в формате конфигуратора
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: export.7z
if-no-files-found: error
retention-days: 1