mirror of
https://github.com/bia-technologies/yaxunit.git
synced 2025-01-05 12:50:36 +02:00
decomposition
This commit is contained in:
parent
eab6df8b62
commit
e07f72e6cb
164
.github/workflows/build.yml
vendored
164
.github/workflows/build.yml
vendored
@ -1,21 +1,22 @@
|
|||||||
name: build
|
name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_call:
|
||||||
branches: [ feature/**, develop ]
|
inputs:
|
||||||
concurrency:
|
v8_version:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
type: string
|
||||||
cancel-in-progress: true
|
required: true
|
||||||
|
edt_version:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
artifact_name:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
jobs:
|
jobs:
|
||||||
build-dev:
|
build-dev:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
|
||||||
V8_VERSION: 8.3.21.1895
|
|
||||||
EDT_VERSION: 2023.1.2
|
|
||||||
IB_PATH: file-db
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
- uses: actions/checkout@v3n
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: prepare
|
- name: prepare
|
||||||
run: |
|
run: |
|
||||||
@ -23,68 +24,12 @@ jobs:
|
|||||||
mkdir binary
|
mkdir binary
|
||||||
mkdir file-db
|
mkdir file-db
|
||||||
mkdir reports
|
mkdir reports
|
||||||
sudo apt-get install -y locales
|
|
||||||
sudo localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8
|
|
||||||
|
|
||||||
- name: install x11 (for run tests)
|
|
||||||
run: |
|
|
||||||
{
|
|
||||||
sudo apt-get install -y x11-xserver-utils
|
|
||||||
} || set +e
|
|
||||||
continue-on-error: true
|
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: install xserver-dummy (for run tests)
|
|
||||||
run: sudo apt-get install -y xserver-xorg-video-dummy
|
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: create dummy-config (for run tests)
|
|
||||||
uses: DamianReeves/write-file-action@master
|
|
||||||
with:
|
|
||||||
path: dummy-1920x1080.conf
|
|
||||||
contents: |
|
|
||||||
Section "Monitor"
|
|
||||||
Identifier "Monitor0"
|
|
||||||
HorizSync 28.0-80.0
|
|
||||||
VertRefresh 48.0-75.0
|
|
||||||
# https://arachnoid.com/modelines/
|
|
||||||
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
|
|
||||||
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
|
|
||||||
EndSection
|
|
||||||
Section "Device"
|
|
||||||
Identifier "Card0"
|
|
||||||
Driver "dummy"
|
|
||||||
VideoRam 256000
|
|
||||||
EndSection
|
|
||||||
Section "Screen"
|
|
||||||
DefaultDepth 24
|
|
||||||
Identifier "Screen0"
|
|
||||||
Device "Card0"
|
|
||||||
Monitor "Monitor0"
|
|
||||||
SubSection "Display"
|
|
||||||
Depth 24
|
|
||||||
Modes "1920x1080_60.00"
|
|
||||||
EndSubSection
|
|
||||||
EndSection
|
|
||||||
|
|
||||||
- name: start xserver (for run tests)
|
|
||||||
run: sudo X :99 -config dummy-1920x1080.conf &
|
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: thinck client libs
|
|
||||||
run: |
|
|
||||||
sudo ln -s /usr/lib/x86_64-linux-gnu/libenchant-2.so.2 /usr/lib/libenchant.so.1
|
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|
||||||
at-spi2-core \
|
|
||||||
mesa-utils \
|
|
||||||
libgl1-mesa-glx
|
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: install EDT
|
- name: install EDT
|
||||||
uses: IT-Medved/onec-setup-build-env-action@develop
|
uses: IT-Medved/onec-setup-build-env-action@develop
|
||||||
with:
|
with:
|
||||||
type: edt
|
type: edt
|
||||||
edt_version: ${{ env.EDT_VERSION }}
|
edt_version: ${{ inputs.edt_version }}
|
||||||
cache: true
|
cache: true
|
||||||
env:
|
env:
|
||||||
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
|
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
|
||||||
@ -95,7 +40,7 @@ jobs:
|
|||||||
uses: IT-Medved/onec-setup-build-env-action@develop
|
uses: IT-Medved/onec-setup-build-env-action@develop
|
||||||
with:
|
with:
|
||||||
type: onec
|
type: onec
|
||||||
onec_version: ${{ env.V8_VERSION }}
|
onec_version: ${{ inputs.v8_version }}
|
||||||
cache: false
|
cache: false
|
||||||
env:
|
env:
|
||||||
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
|
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
|
||||||
@ -108,7 +53,7 @@ jobs:
|
|||||||
export: true
|
export: true
|
||||||
from: fixtures/demo-configuration
|
from: fixtures/demo-configuration
|
||||||
to: export/configuration
|
to: export/configuration
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
- name: export yaxunit extension
|
- name: export yaxunit extension
|
||||||
uses: IT-Medved/onec-edtcli-command-action@feature/init
|
uses: IT-Medved/onec-edtcli-command-action@feature/init
|
||||||
@ -116,7 +61,7 @@ jobs:
|
|||||||
export: true
|
export: true
|
||||||
from: exts/yaxunit
|
from: exts/yaxunit
|
||||||
to: export/yaxunit
|
to: export/yaxunit
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
- name: export tests extension
|
- name: export tests extension
|
||||||
uses: IT-Medved/onec-edtcli-command-action@feature/init
|
uses: IT-Medved/onec-edtcli-command-action@feature/init
|
||||||
@ -124,81 +69,40 @@ jobs:
|
|||||||
export: true
|
export: true
|
||||||
from: tests
|
from: tests
|
||||||
to: export/tests
|
to: export/tests
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
- name: create IB
|
- name: create IB
|
||||||
run: ibcmd infobase create --db-path=file-db --import=export/configuration --apply --force
|
run: ibcmd infobase create --db-path=file-db --import=export/configuration --apply --force
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
- name: import yaxunit
|
- name: import yaxunit
|
||||||
run: |
|
run: |
|
||||||
ibcmd infobase config import --db-path=file-db --extension=YAXUNIT export/yaxunit
|
ibcmd infobase config import --db-path=file-db --extension=YAXUNIT export/yaxunit
|
||||||
ibcmd infobase config apply --db-path=file-db --extension=YAXUNIT --force
|
ibcmd infobase config apply --db-path=file-db --extension=YAXUNIT --force
|
||||||
ibcmd infobase config extension update --db-path=file-db --name=YAXUNIT --safe-mode=no --unsafe-action-protection=no
|
ibcmd infobase config extension update --db-path=file-db --name=YAXUNIT --safe-mode=no --unsafe-action-protection=no
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
- name: import tests
|
- name: import tests
|
||||||
run: |
|
run: |
|
||||||
ibcmd infobase config import --db-path=file-db --extension=tests export/tests
|
ibcmd infobase config import --db-path=file-db --extension=tests export/tests
|
||||||
ibcmd infobase config apply --db-path=file-db --extension=tests --force
|
ibcmd infobase config apply --db-path=file-db --extension=tests --force
|
||||||
ibcmd infobase config extension update --db-path=file-db --name=tests --safe-mode=no --unsafe-action-protection=no
|
ibcmd infobase config extension update --db-path=file-db --name=tests --safe-mode=no --unsafe-action-protection=no
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: save yaxunit extension
|
|
||||||
run: ibcmd infobase config save --db-path=file-db --extension=YAXUNIT binary/YAXUNIT.cfe
|
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: save stage
|
|
||||||
run: ibcmd infobase dump --db-path=file-db binary/dump.dt
|
|
||||||
timeout-minutes: 5
|
|
||||||
|
|
||||||
- name: run server
|
|
||||||
run: |
|
|
||||||
ibsrv --db-path=file-db --daemon
|
|
||||||
|
|
||||||
- name: create test-config
|
|
||||||
uses: DamianReeves/write-file-action@master
|
|
||||||
with:
|
|
||||||
path: unit.json
|
|
||||||
contents: |
|
|
||||||
{
|
|
||||||
"reportFormat": "jUnit",
|
|
||||||
"reportPath": "reports/report.xml",
|
|
||||||
"closeAfterTests": true,
|
|
||||||
"exitCode": "exit-code.txt"
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: run tests
|
|
||||||
run: |
|
|
||||||
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
|
||||||
export DISPLAY=:99
|
|
||||||
export LANG=ru_RU.UTF-8
|
|
||||||
1cv8c /WS "http://localhost:8314" /C"RunUnitTests=${{github.workspace}}/unit.json" /DisableStartupDialogs /DisableStartupMessages /DisableUnrecoverableErrorMessage /Out output.log
|
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
||||||
- name: view output
|
- name: save yaxunit
|
||||||
if: success() || failure()
|
run: ibcmd infobase config save --db-path=file-db --extension=YAXUNIT binary/yaxunit.cfe
|
||||||
run: cat output.log
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: save yaxunit
|
||||||
|
run: ibcmd infobase config save --db-path=file-db --extension=tests binary/tests.cfe
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: save yaxunit
|
||||||
|
run: ibcmd infobase config save --db-path=file-db binary/configuration.cf
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
- name: upload-artifact
|
- name: upload-artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: success() || failure() # always run even if the previous step fails
|
|
||||||
with:
|
with:
|
||||||
name: stage
|
name: ${{ inputs.artifact_name }}
|
||||||
path: binary/*.*
|
path: binary/*.*
|
||||||
|
|
||||||
- name: upload-artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
if: success() || failure() # always run even if the previous step fails
|
|
||||||
with:
|
|
||||||
name: reports
|
|
||||||
path: reports/*.*
|
|
||||||
|
|
||||||
- name: Publish Test Report
|
|
||||||
uses: mikepenz/action-junit-report@v3
|
|
||||||
if: success() || failure() # always run even if the previous step fails
|
|
||||||
with:
|
|
||||||
report_paths: reports/report.xml
|
|
||||||
fail_on_failure: true
|
|
||||||
require_passed_tests: true
|
|
||||||
update_check: true
|
|
||||||
|
51
.github/workflows/main-build.yml
vendored
Normal file
51
.github/workflows/main-build.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
name: Build and test
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ feature/**, develop ]
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
v8_version: 8.3.21.1895
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-artifacts:
|
||||||
|
uses: ./.github/workflows/build.yml
|
||||||
|
with:
|
||||||
|
v8_version: ${{ env.v8_version }}
|
||||||
|
edt_version: 2023.1.2
|
||||||
|
artifact_name: build-artifacts
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
tests Linux;ru_RU:
|
||||||
|
uses: ./.github/workflows/run-tests-linux.yml
|
||||||
|
need: build-artifacts
|
||||||
|
with:
|
||||||
|
v8_version: ${{ env.v8_version }}
|
||||||
|
artifact_name: build-artifacts
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
tests Linux;en_US:
|
||||||
|
uses: ./.github/workflows/run-tests-linux.yml
|
||||||
|
need: build-artifacts
|
||||||
|
with:
|
||||||
|
v8_version: ${{ env.v8_version }}
|
||||||
|
artifact_name: build-artifacts
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
tests Windows;ru_RU:
|
||||||
|
uses: ./.github/workflows/run-tests-windows.yml
|
||||||
|
need: build-artifacts
|
||||||
|
with:
|
||||||
|
v8_version: ${{ env.v8_version }}
|
||||||
|
artifact_name: build-artifacts
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
tests MacOS;ru_RU:
|
||||||
|
uses: ./.github/workflows/run-tests-macos.yml
|
||||||
|
need: build-artifacts
|
||||||
|
with:
|
||||||
|
v8_version: ${{ env.v8_version }}
|
||||||
|
artifact_name: build-artifacts
|
||||||
|
secrets: inherit
|
153
.github/workflows/run-tests-linux.yml
vendored
Normal file
153
.github/workflows/run-tests-linux.yml
vendored
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
name: Run tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
v8_version:
|
||||||
|
description: 'Platform version'
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
locale:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ru_RU
|
||||||
|
artifact_name:
|
||||||
|
type: string
|
||||||
|
required: true
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.v8_version }}-${{ inputs.locale }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
execute-tests:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
- name: download artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.artifact_name }}
|
||||||
|
path: binary
|
||||||
|
|
||||||
|
- name: prepare
|
||||||
|
run: |
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
locales \
|
||||||
|
at-spi2-core \
|
||||||
|
mesa-utils \
|
||||||
|
libgl1-mesa-glx
|
||||||
|
sudo ln -s /usr/lib/x86_64-linux-gnu/libenchant-2.so.2 /usr/lib/libenchant.so.1
|
||||||
|
sudo localedef -i ${{ inputs.locale }} -c -f UTF-8 -A /usr/share/locale/locale.alias ${{ inputs.locale }}.UTF-8
|
||||||
|
|
||||||
|
- name: install platform
|
||||||
|
uses: IT-Medved/onec-setup-build-env-action@develop
|
||||||
|
with:
|
||||||
|
type: onec
|
||||||
|
onec_version: ${{ inputs.v8_version }}
|
||||||
|
cache: false
|
||||||
|
env:
|
||||||
|
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
|
||||||
|
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
- name: install x11
|
||||||
|
run: sudo apt-get install -y x11-xserver-utils
|
||||||
|
continue-on-error: true
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: install xserver-dummy
|
||||||
|
run: sudo apt-get install -y xserver-xorg-video-dummy
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: create dummy-config
|
||||||
|
uses: DamianReeves/write-file-action@master
|
||||||
|
with:
|
||||||
|
path: dummy-1920x1080.conf
|
||||||
|
contents: |
|
||||||
|
Section "Monitor"
|
||||||
|
Identifier "Monitor0"
|
||||||
|
HorizSync 28.0-80.0
|
||||||
|
VertRefresh 48.0-75.0
|
||||||
|
# https://arachnoid.com/modelines/
|
||||||
|
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
|
||||||
|
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
|
||||||
|
EndSection
|
||||||
|
Section "Device"
|
||||||
|
Identifier "Card0"
|
||||||
|
Driver "dummy"
|
||||||
|
VideoRam 256000
|
||||||
|
EndSection
|
||||||
|
Section "Screen"
|
||||||
|
DefaultDepth 24
|
||||||
|
Identifier "Screen0"
|
||||||
|
Device "Card0"
|
||||||
|
Monitor "Monitor0"
|
||||||
|
SubSection "Display"
|
||||||
|
Depth 24
|
||||||
|
Modes "1920x1080_60.00"
|
||||||
|
EndSubSection
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
- name: start xserver
|
||||||
|
run: sudo X :99 -config dummy-1920x1080.conf &
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: create IB
|
||||||
|
run: ibcmd infobase create --db-path=file-db --load=binary/configuration.cf --apply --force
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: load yaxunit
|
||||||
|
run: |
|
||||||
|
ibcmd infobase config load --db-path=file-db --extension=YAXUNIT --force binary/yaxunit.cfe
|
||||||
|
ibcmd infobase config apply --db-path=file-db --extension=YAXUNIT --force
|
||||||
|
ibcmd infobase config extension update --db-path=file-db --name=YAXUNIT --safe-mode=no --unsafe-action-protection=no
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: load tests
|
||||||
|
run: |
|
||||||
|
ibcmd infobase config load --db-path=file-db --extension=tests --force binary/tests.cfe
|
||||||
|
ibcmd infobase config apply --db-path=file-db --extension=tests --force
|
||||||
|
ibcmd infobase config extension update --db-path=file-db --name=tests --safe-mode=no --unsafe-action-protection=no
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: run server
|
||||||
|
run: |
|
||||||
|
ibsrv --db-path=file-db --daemon
|
||||||
|
|
||||||
|
- name: create test-config
|
||||||
|
uses: DamianReeves/write-file-action@master
|
||||||
|
with:
|
||||||
|
path: unit.json
|
||||||
|
contents: |
|
||||||
|
{
|
||||||
|
"reportFormat": "jUnit",
|
||||||
|
"reportPath": "reports/report.xml",
|
||||||
|
"closeAfterTests": true,
|
||||||
|
"exitCode": "exit-code.txt"
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
run: |
|
||||||
|
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
||||||
|
export DISPLAY=:99
|
||||||
|
export LANG=${{ inputs.locale }}.UTF-8
|
||||||
|
1cv8c /WS "http://localhost:8314" /C"RunUnitTests=${{github.workspace}}/unit.json" /DisableStartupDialogs /DisableStartupMessages /DisableUnrecoverableErrorMessage /Out output.log
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
- name: view output
|
||||||
|
if: always()
|
||||||
|
run: cat output.log
|
||||||
|
|
||||||
|
- name: upload-artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: report-linux-${{ inputs.v8_version }}-${{ inputs.locale }}
|
||||||
|
path: reports/*.*
|
||||||
|
|
||||||
|
- name: Publish Test Report
|
||||||
|
uses: mikepenz/action-junit-report@v3
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
report_paths: reports/report.xml
|
||||||
|
fail_on_failure: true
|
||||||
|
require_passed_tests: true
|
||||||
|
update_check: true
|
Loading…
Reference in New Issue
Block a user