2023-08-27 01:33:30 +02:00
|
|
|
name: Run tests on Linux
|
2023-08-27 01:22:08 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
v8_version:
|
|
|
|
description: 'Platform version'
|
|
|
|
type: string
|
|
|
|
required: true
|
2023-08-27 23:46:47 +02:00
|
|
|
|
2023-08-27 01:22:08 +02:00
|
|
|
locale:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
default: ru_RU
|
2023-08-27 23:46:47 +02:00
|
|
|
|
2023-08-27 01:22:08 +02:00
|
|
|
artifact_name:
|
|
|
|
type: string
|
2023-10-03 22:29:27 +02:00
|
|
|
required: false
|
|
|
|
default: build-artifacts
|
2023-08-27 23:46:47 +02:00
|
|
|
|
2023-08-27 02:55:26 +02:00
|
|
|
fail_on_failure:
|
|
|
|
type: boolean
|
|
|
|
required: false
|
|
|
|
default: true
|
2023-08-27 23:46:47 +02:00
|
|
|
|
2023-08-29 19:47:40 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
checks: write
|
|
|
|
id-token: write
|
|
|
|
|
2023-08-27 01:22:08 +02:00
|
|
|
concurrency:
|
2023-10-03 23:25:08 +02:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.v8_version }}-${{ inputs.locale }}-${{ github.event.number }}-Linux
|
2023-08-27 01:22:08 +02:00
|
|
|
cancel-in-progress: true
|
2023-08-27 23:46:47 +02:00
|
|
|
|
2023-08-27 01:22:08 +02:00
|
|
|
jobs:
|
|
|
|
execute-tests:
|
2023-08-27 23:46:47 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-08-27 01:33:30 +02:00
|
|
|
steps:
|
2023-08-27 01:22:08 +02:00
|
|
|
|
|
|
|
- name: download artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ inputs.artifact_name }}
|
|
|
|
path: binary
|
|
|
|
|
|
|
|
- name: prepare
|
|
|
|
run: |
|
2023-08-27 03:03:44 +02:00
|
|
|
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y locales
|
2023-08-27 01:22:08 +02:00
|
|
|
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
|
2023-08-29 19:10:10 +02:00
|
|
|
mkdir reports -p
|
2023-08-27 01:22:08 +02:00
|
|
|
|
|
|
|
- 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
|
2023-08-27 23:46:47 +02:00
|
|
|
run: ibsrv --db-path=file-db --daemon
|
2023-08-27 01:22:08 +02:00
|
|
|
|
|
|
|
- name: create test-config
|
|
|
|
uses: DamianReeves/write-file-action@master
|
|
|
|
with:
|
|
|
|
path: unit.json
|
|
|
|
contents: |
|
|
|
|
{
|
|
|
|
"reportFormat": "jUnit",
|
|
|
|
"reportPath": "reports/report.xml",
|
|
|
|
"closeAfterTests": true,
|
2023-08-29 18:38:26 +02:00
|
|
|
"exitCode": "exit-code.txt",
|
|
|
|
"logging": {
|
|
|
|
"console": true
|
|
|
|
}
|
2023-08-27 01:22:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- name: run tests
|
2023-08-31 00:31:16 +02:00
|
|
|
run: 1cv8c /WS "http://localhost:8314" /C"RunUnitTests=${{github.workspace}}/unit.json" /DisableStartupDialogs /DisableStartupMessages /DisableUnrecoverableErrorMessage /Out ${{github.workspace}}/output.log
|
2023-08-27 01:22:08 +02:00
|
|
|
timeout-minutes: 5
|
2023-08-27 23:46:47 +02:00
|
|
|
env:
|
|
|
|
DISPLAY: :99
|
|
|
|
LANG: "${{ inputs.locale }}.UTF-8"
|
|
|
|
|
2023-08-27 01:22:08 +02:00
|
|
|
- name: view output
|
|
|
|
if: always()
|
2023-08-31 00:31:16 +02:00
|
|
|
run: cat ./output.log
|
2023-08-27 01:22:08 +02:00
|
|
|
|
|
|
|
- name: upload-artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: always()
|
|
|
|
with:
|
2023-08-30 00:28:06 +02:00
|
|
|
name: Tests report. Linux ${{ inputs.v8_version }} ${{ inputs.locale }}
|
2023-08-27 01:22:08 +02:00
|
|
|
path: reports/*.*
|
|
|
|
|
|
|
|
- name: Publish Test Report
|
|
|
|
uses: mikepenz/action-junit-report@v3
|
|
|
|
if: always()
|
|
|
|
with:
|
2023-08-30 00:28:06 +02:00
|
|
|
job_name: Tests Linux ${{ inputs.v8_version }} ${{ inputs.locale }}
|
|
|
|
check_name: Tests report. Linux ${{ inputs.v8_version }} ${{ inputs.locale }}
|
2023-08-27 01:22:08 +02:00
|
|
|
report_paths: reports/report.xml
|
2023-08-27 02:55:26 +02:00
|
|
|
fail_on_failure: ${{ inputs.fail_on_failure }}
|
2023-08-30 00:01:21 +02:00
|
|
|
require_passed_tests: true
|