1
0
mirror of https://github.com/bia-technologies/yaxunit.git synced 2025-01-08 13:06:32 +02:00
yaxunit/.github/workflows/run-tests-windows.yml

118 lines
3.5 KiB
YAML
Raw Normal View History

2023-08-27 01:33:30 +02:00
name: Run tests on Windows
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:33:30 +02:00
locale:
type: string
required: false
default: ru_RU
2023-08-27 01:33:30 +02:00
artifact_name:
type: string
required: true
fail_on_failure:
type: boolean
required: false
default: true
2023-08-27 23:46:47 +02:00
2023-08-27 01:33:30 +02:00
concurrency:
2023-08-27 01:58:02 +02:00
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.v8_version }}-${{ inputs.locale }}-Windows
2023-08-27 01:33:30 +02:00
cancel-in-progress: true
2023-08-27 23:46:47 +02:00
2023-08-27 01:33:30 +02:00
jobs:
execute-tests:
runs-on: windows-latest
defaults:
run:
shell: pwsh
2023-08-27 02:09:59 +02:00
steps:
- name: download artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact_name }}
path: binary
- name: install platform
uses: alkoleft/onec-setup-build-env-action@develop
with:
type: onec
onec_version: ${{ inputs.v8_version }}
env:
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
timeout-minutes: 10
- name: create IB
run: |
mkdir data\data
ibcmd.exe infobase create --data=data --load=binary\configuration.cf --apply --force
timeout-minutes: 5
- name: load yaxunit
run: |
ibcmd.exe infobase config load --data=data --extension=YAXUNIT --force binary\yaxunit.cfe
ibcmd.exe infobase config apply --data=data --extension=YAXUNIT --force
ibcmd.exe infobase config extension update --data=data --name=YAXUNIT --safe-mode=no --unsafe-action-protection=no
timeout-minutes: 5
- name: load tests
run: |
ibcmd.exe infobase config load --data=data --extension=tests --force binary\tests.cfe
ibcmd.exe infobase config apply --data=data --extension=tests --force
ibcmd.exe infobase config extension update --data=data --name=tests --safe-mode=no --unsafe-action-protection=no
timeout-minutes: 5
- 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",
"logging": {
"console": true,
"file": "execute.log"
}
}
- name: Test
run: |
Start-Process ibsrv.exe -ArgumentList "--data=data"
Start-Process -NoNewWindow -PassThru -Wait 1cv8c.exe -ArgumentList '/WS "http://localhost:8314" /C"RunUnitTests=unit.json" /L ru /VL ${{ inputs.locale }} /DisableStartupDialogs /DisableStartupMessages /DisableUnrecoverableErrorMessage /Out 1cv8c-output.log'
timeout-minutes: 10
- name: view output
if: always()
run: type execute.log
- name: view output
if: always()
run: type 1cv8c-output.log
- name: upload-artifact
uses: actions/upload-artifact@v3
with:
name: Tests report. Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
path: reports/
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
with:
job_name: Tests Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
check_name: Tests report. Windows ${{ inputs.v8_version }} ${{ inputs.locale }}
report_paths: reports/report.xml
fail_on_failure: ${{ inputs.fail_on_failure }}
require_passed_tests: true